I found a solution for the problem. It comes in form of a custom makefile, that is a patched makefile.win created by my Dev-C++
Basically, the tool dllwrap is not used any more. All the work is driven by g++
Also, I've changed slightly the sample DLL and the caller program, such that user may see what went wrong.
Note that I don't make use of prefabricated DEF files (actually, seldom did...).
For the sake of clarity, the solution I present is actually taken from Scintilla's makefile for GCC (that works !).
A question for this forum maintainer : what is wrong with my 1st message above to still place in "awaiting moderation" bin for more than 3 months ?
I am still convinced I found a small communication problem between Dev-C++ and TDM-GCC.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was able to reproduce this issue (default dll project not building) in 5.7.1. I'll spend a little time pulling together additional detail for the maintainer and will file a ticket, if you didn't already M. Trifon.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Notice they are $(DEFFILE) instead of $(DEF) and $(STATICLIB) instead of $(STATIC).
I'll create a ticket with the gory details. One other thing that I noticed was that when I have the Makefile.win open in dev-cpp editor pane, I cannot compile. It tells me that the file is invalid. If I close the Makefile.win in dev-cpp and edit it in Notepad++, the error does not occur.
Last edit: Matthew MacGregor 2014-10-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Makefile.win is autogenerated in code, so we'll need to wait for a release to properly fix the issue. In the meantime the following steps resolved this for me:
Attempt to compile your dll project. This will generate the Makefile.win but will fail.
I found a solution for the problem. It comes in form of a custom makefile, that is a patched makefile.win created by my Dev-C++
Basically, the tool dllwrap is not used any more. All the work is driven by g++
Also, I've changed slightly the sample DLL and the caller program, such that user may see what went wrong.
Note that I don't make use of prefabricated DEF files (actually, seldom did...).
For the sake of clarity, the solution I present is actually taken from Scintilla's makefile for GCC (that works !).
A question for this forum maintainer : what is wrong with my 1st message above to still place in "awaiting moderation" bin for more than 3 months ?
I am still convinced I found a small communication problem between Dev-C++ and TDM-GCC.
I was able to reproduce this issue (default dll project not building) in 5.7.1. I'll spend a little time pulling together additional detail for the maintainer and will file a ticket, if you didn't already M. Trifon.
Hello. I spent some time this evening and I believe that I've figured out the problem with Dev-Cpp not compiling the sample dll project.
EDIT: It's worth noting that I can only reproduce this problem with DLL Projects in C. The autogen makefile for C++ seems unaffected.
There's a simple error in the autogenerated makefile:
Def and lib files are defined:
DEF = libDllTest4.def
STATIC = libDllTest4.a
But for that build target:
$(CC) -shared $(LINKOBJ) -o $(BIN) $(LIBS) -Wl,--output-def,$(DEFFILE),--out-implib,$(STATICLIB),--add-stdcall-alias
Notice they are $(DEFFILE) instead of $(DEF) and $(STATICLIB) instead of $(STATIC).
I'll create a ticket with the gory details. One other thing that I noticed was that when I have the Makefile.win open in dev-cpp editor pane, I cannot compile. It tells me that the file is invalid. If I close the Makefile.win in dev-cpp and edit it in Notepad++, the error does not occur.
Last edit: Matthew MacGregor 2014-10-10
The Makefile.win is autogenerated in code, so we'll need to wait for a release to properly fix the issue. In the meantime the following steps resolved this for me:
to:
Hopefully this will resolve the issue for you as well!
Last edit: Matthew MacGregor 2014-10-10
By the way, M. Trifon, your makefile also worked for me. That being said, it's a very minor change to the existing Makefile.win to fix this issue.
Please give this fix a try and see if it resolves the issue for you as well.
Ticket submitted here: Ticket 136
As can be seen in the reply to ticket 136, the problem has been fixed as of 5.8.0.