digitalmars.D - [GtkD] Error 1: Previous Definition Different : __Dmain
- "Adrien =?UTF-8?B?VMOpdGFyIg==?= <adri-from-59 hotmail.fr> (12/12) Oct 27 2012 Hi,
- Mike Wey (4/15) Oct 27 2012 Did you already check if your code doesn't actually defines main twice?
- "Adrien =?UTF-8?B?VMOpdGFyIg==?= <adri-from-59 hotmail.fr> (10/12) Oct 27 2012 I don't think so... here's the code:
- Mike Wey (5/17) Oct 28 2012 Did you run the dgen executable from the src directory, otherwise it
- "Adrien =?UTF-8?B?VMOpdGFyIg==?= <adri-from-59 hotmail.fr> (15/18) Oct 28 2012 Yea I did.
- Robik (2/20) Oct 28 2012 Try removing dgen.d from there :)
- Walter Bright (6/9) Oct 28 2012 http://www.digitalmars.com/ctg/OptlinkErrorMessages.html#previous_defini...
Hi, I have compiled GtkD 2.0 on Windows. Source files are passed to the compiler as well as library to the linker. I followed instructions from here : https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows But there is an error appearing when GtkD.lib is passed to the linker: Error 1: Previous Definition Different : __Dmain This is supposed to mean that there are two main function in the code, but how do I fix it ? Thanks in advance. PS: I use DMD 2.060.
Oct 27 2012
On 10/27/2012 05:33 PM, "Adrien Tétar" <adri-from-59 hotmail.fr>" wrote:Hi, I have compiled GtkD 2.0 on Windows. Source files are passed to the compiler as well as library to the linker. I followed instructions from here : https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows But there is an error appearing when GtkD.lib is passed to the linker: Error 1: Previous Definition Different : __Dmain This is supposed to mean that there are two main function in the code, but how do I fix it ? Thanks in advance. PS: I use DMD 2.060.Did you already check if your code doesn't actually defines main twice? -- Mike Wey
Oct 27 2012
On Saturday, 27 October 2012 at 20:02:16 UTC, Mike Wey wrote:Did you already check if your code doesn't actually defines main twice?I don't think so... here's the code: module primary; import gtk.Main; void main(string[] args) { Main.init(args); Main.run(); } Thanks for your help.
Oct 27 2012
On 10/27/2012 10:18 PM, "Adrien Tétar" <adri-from-59 hotmail.fr>" wrote:On Saturday, 27 October 2012 at 20:02:16 UTC, Mike Wey wrote:Did you run the dgen executable from the src directory, otherwise it might be possible that some of the demos got compiled into the library. -- Mike WeyDid you already check if your code doesn't actually defines main twice?I don't think so... here's the code: module primary; import gtk.Main; void main(string[] args) { Main.init(args); Main.run(); } Thanks for your help.
Oct 28 2012
On Sunday, 28 October 2012 at 16:10:25 UTC, Mike Wey wrote:Did you run the dgen executable from the src directory, otherwise it might be possible that some of the demos got compiled into the library.Yea I did. [IMG]http://www.abload.de/img/dgenrnk9j.png[/IMG] I even tried to remove the 'demos' folder but the compiled lib is of the same size... Maybe that happens because I use Eclipse + DDT? Here is my sc.ini : [Version] version=7.51 Build 020 [Environment] LIB="% P%\..\lib";\dm\lib DFLAGS="-I% P%\..\..\src\phobos" "-I% P%\..\..\src\druntime\import" "-I% P%\..\..\src\gtkd" "-L C:\D\dmd2\windows\lib\GtkD.lib" LINKCMD=% P%\link.exe
Oct 28 2012
On Sunday, 28 October 2012 at 18:15:14 UTC, Adrien Tétar wrote:On Sunday, 28 October 2012 at 16:10:25 UTC, Mike Wey wrote:Try removing dgen.d from there :)Did you run the dgen executable from the src directory, otherwise it might be possible that some of the demos got compiled into the library.Yea I did. [IMG]http://www.abload.de/img/dgenrnk9j.png[/IMG] I even tried to remove the 'demos' folder but the compiled lib is of the same size... Maybe that happens because I use Eclipse + DDT? Here is my sc.ini : [Version] version=7.51 Build 020 [Environment] LIB="% P%\..\lib";\dm\lib DFLAGS="-I% P%\..\..\src\phobos" "-I% P%\..\..\src\druntime\import" "-I% P%\..\..\src\gtkd" "-L C:\D\dmd2\windows\lib\GtkD.lib" LINKCMD=% P%\link.exe
Oct 28 2012
On 10/27/2012 8:33 AM, "Adrien Tétar" <adri-from-59 hotmail.fr>" wrote:> But there is an error appearing when GtkD.lib is passed to the linker:Error 1: Previous Definition Different : __Dmain This is supposed to mean that there are two main function in the code,http://www.digitalmars.com/ctg/OptlinkErrorMessages.html#previous_definition_differentbut how do I fix it ?Try this: grep _Dmain gtkd.lib and see if it is in there.
Oct 28 2012