Menu

#136 Error in Autogenerated Makefile for Dll Sample Project

None
fixed
None
2014-10-10
2014-10-10
No

Version: 5.7.1 w TDD-GCC 4.8.1
OS version: Windows 8.1 64 bit
Error reported: Sample DLL Project (C) will not build
Stack trace: None
Reference: Forum post
Affects: C DLL Projects (C++ Not Affected)
Steps needed to reproduce the problem:

  • Create a new Dll Project in Dev-cpp.
  • Build the project.
  • I receive the following errors:

ld.exe Can't open output def file
ld.exe Error closing file `'
collect2.exe [Error] ld returned 1 exit status
Makefile.win recipe for target 'DllTest4.dll' failed

  • While researching this problem I discovered the following definitions in the Makefile:

DEF = libDllTest4.def
STATIC = libDllTest4.a

  • These are out of sync with the build target definition (note the $(DEFFILE) and $(STATICLIB)):

$(CC) -shared $(LINKOBJ) -o $(BIN) $(LIBS) -Wl,--output-def,$(DEFFILE),--out-implib,$(STATICLIB),--add-stdcall-alias

  • Renaming $(DEFFILE) to $(DEF) and $(STATICLIB) to $(LIB) and cleaning the project resolves the issue for me.

Discussion

  • Matthew MacGregor

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,8 +1,9 @@
     Version: 5.7.1 w TDD-GCC 4.8.1
     OS version: Windows 8.1 64 bit
    -Error reported: Sample DLL Project will not build
    +Error reported: Sample DLL Project (C) will not build
     Stack trace: None
     Reference: [Forum post](https://sourceforge.net/p/orwelldevcpp/forums/compiling/thread/0fe5ac43/)
    +Affects: C DLL Projects (C++ Not Affected)
     Steps needed to reproduce the problem:
    
     + Create a new Dll Project in Dev-cpp.
    
    • Milestone: -->
     
  • orwelldevcpp

    orwelldevcpp - 2014-10-10

    Fixed as of 5.8.0.

    The affected function was TCompiler.CreateDynamicMakeFile, which used old makefile parameter names when Project.Options.useGPP was false (in other words, when a C project is compiled).

     
  • orwelldevcpp

    orwelldevcpp - 2014-10-10
    • status: open --> fixed
    • assigned_to: orwelldevcpp
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.