3

I'm using Visual Studio 2013, Visual D Version 0.3.37, Gtk+3.8, the latest GtkD and dmd-2.065.0, on Windows 7. I followed these instructions to build GtkD, and set up my compiler to compile it. In Visual Studio, I told VisualD to use the compiler switch that the instructions used to compile a project using GtkD. I tried to compile the "Hello World" program given in the instructions using the "Compile and Run" command of Visual D. After a long compilation I got the following error:

Compiling main.d...

OPTLINK (R) for Win32  Release 8.00.15
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
C:\D\dmd2\windows\bin\..\lib\gtkd.lib(Action)  Offset 03B19H Record Type 0091 
Error 1: Previous Definition Different : _D3atk9ObjectAtk9ObjectAtk6__initZ
C:\D\dmd2\windows\bin\..\lib\gtkd.lib(Action)  Offset 03B42H Record Type 0091 
Error 1: Previous Definition Different : _D3atk9ObjectAtk9ObjectAtk7__ClassZ
C:\D\dmd2\windows\bin\..\lib\gtkd.lib(Action)  Offset 03B6AH Record Type 0091 
Error 1: Previous Definition Different : _D3atk9ObjectAtk9ObjectAtk6__vtblZ
C:\D\dmd2\windows\bin\..\lib\gtkd.lib(Action)  Offset FFE57H Record Type 0091 
Error 1: Previous Definition Different : _D3atk9ObjectAtk12__ModuleInfoZ 

//bunch more similar lines follow...

--- errorlevel 14816
Building Debug\main.exe failed!

I'm not sure what I did wrong; I followed the instructions exactly, and I know my compiler works. What am I missing?

Drago0661
  • 43
  • 3

1 Answers1

0

I think the error occurs because Visual Studio is compiling GtkD again, instead of simply using the .d files for reference and using the .lib file for the compiled implementation. You may need to either exclude GtkD files from compilation, or remove the .lib file from the project to let Visual Studio compile GtkD together with your application.

Vladimir Panteleev
  • 24,651
  • 6
  • 70
  • 114