View previous topic :: View next topic |
Author |
Message |
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Tue Sep 13, 2005 6:18 pm Post subject: dfl.lib problem |
|
|
OK, I just figured something out. Some perfect code compiled in a perfectly setup DMD and DFL environment can still fail. This happens when not compiling the code with the -debug switch. dfl.lib is made using -debug and if you don't use -debug as well, it can cause problems such as nothing happening at all when running your program, or a message box saying "Control creation failure.". I didn't notice this because I compile most of my code with -debug.
So, for now, just always use -debug when compiling with DFL. I have some ideas to resolve this issue.
Sorry for this; just glad I figured it out. I swear it's a pain distributing lib files |
|
Back to top |
|
|
Thorn
Joined: 12 Sep 2005 Posts: 10
|
Posted: Wed Sep 14, 2005 12:57 am Post subject: Re: dfl.lib problem |
|
|
Vathix wrote: | dfl.lib is made using -debug and if you don't use -debug as well, it can cause problems such as nothing happening at all when running your program, or a message box saying "Control creation failure.". |
Eh! It's exactly what I got when I compiled examples! But... why we need to use -debug? It's strange limitation. May be you can fix it? Debug is debug, release is release. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Wed Sep 14, 2005 10:39 am Post subject: Re: dfl.lib problem |
|
|
Thorn wrote: | Eh! It's exactly what I got when I compiled examples! But... why we need to use -debug? It's strange limitation. May be you can fix it? Debug is debug, release is release. |
It's due to the way the compiler and linker work. -debug generates slightly different code, which essentially is a different version. It's not safe to mix versions.
If you recompile dfl.lib with different switches, it will work with those switches. |
|
Back to top |
|
|
Thorn
Joined: 12 Sep 2005 Posts: 10
|
Posted: Thu Sep 15, 2005 1:16 am Post subject: Re: dfl.lib problem |
|
|
Vathix wrote: |
It's due to the way the compiler and linker work. -debug generates slightly different code, which essentially is a different version. It's not safe to mix versions.
|
Hmm... What a problem with mixing? DFL uses -debug and make own business, my program uses different switch and do own things.
Vathix wrote: |
If you recompile dfl.lib with different switches, it will work with those switches. |
OK, I will. But when I did it w/o -debug all examples didn't work, though was successfuly compiled. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu Sep 15, 2005 11:20 pm Post subject: Re: dfl.lib problem |
|
|
Thorn wrote: | Vathix wrote: |
It's due to the way the compiler and linker work. -debug generates slightly different code, which essentially is a different version. It's not safe to mix versions.
|
Hmm... What a problem with mixing? DFL uses -debug and make own business, my program uses different switch and do own things. |
Different data structures could be output in different versions and the linker hardly cares as long as it finds the symbols.
For example, one version thinks something is at a certain offset and another version thinks it's at a different offset; bad things happen. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu Sep 22, 2005 9:04 am Post subject: |
|
|
This should be resolved in snapshot 20050922.
- Chris |
|
Back to top |
|
|
|