Menu

DLL Problems

Bart
2009-07-30
2012-09-26
  • Bart

    Bart - 2009-07-30

    I'm a first timer when it comes to dll's. Never made any before and I figured I should give it a try.

    The error I'm getting is probably the single most obscure error I've yet seen (and frankly, mingW is pretty good at throwing obscure errors) :

    Test.dll"
    [Build error] ["DLL] Error 1

    I have no idea what that is supposed to mean. It's the only error I'm getting. Even worse: after a lot of headaches with code that looks perfectly legal, I simply started a new DLL project and pressed "compile" without making any changes to the default template. You'd at least expect the template provided by the dev IDE to work and compile, right? But no, I still get the exact same error.

    Console or windows applications compile perfectly fine. Dll's just don't.

    I'm using vista 32 bit. Haven't tried yet on XP, but I'm not sure why that would help, since normal projects compile...

    Could someone explain what I'm doing wrong?

     
    • Bart

      Bart - 2009-07-31

      I found the problem.

      Apparently I can't have whitespace in my dll name, so after overriding the output filename it suddenly compiled. How exactly the error is related to this, or why precisely you can't have whitespace in your output filenames is pretty much a mystery to me...

       
    • cpns

      cpns - 2009-07-31

      > (and frankly, mingW is pretty good at throwing obscure errors)

      Well you are reading the wrong diagnostic (or at least you posted the wrong diagnostic). You should be looking at the "Compile Log" tab not the "Compiler" tab. The latter is filtered and only correctly parses compiler errors, not linker errors or errors from any other part of the toolchain for that matter.

      > why precisely you can't have whitespace in your output
      > filenames is pretty much a mystery to me

      Funny, because it is all explained in the "PLEASE READ BEFORE POSTING A QUESTION" (along with mentioning the Compile Log also!). Not all the GNU tools play well with paths containing spaces (not just the file names, the directories too). That is largely a consequence of their Linux heritage.

      I can guarantee that had you posted the complete l;og as requested in the read-first thread, your problem will have been spotted immediately. That's why we ask for it! Of course you'd have to read it first ;-)

      Clifford

       

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.