Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » To split Images code to "h" & "cpp" file has a link error, "multiple de
To split Images code to "h" & "cpp" file has a link error, "multiple de [message #19652] |
Mon, 29 December 2008 10:44 |
sevenjay
Messages: 30 Registered: October 2008 Location: Taiwan
|
Member |
|
|
I split "Image tutorial 1" code to "h" & "cpp" file and had some link error: "multiple definition".
C:/upp/out/Image01/MINGW.Debug.Debug_full.Gui.Main\main.o: In function `_ZN8MyImages3ImlEv':
C:/upp/uppsrc/Draw/iml_source.h:33: multiple definition of `MyImages::Iml()'
C:/upp/out/Image01/MINGW.Debug.Debug_full.Gui.Main\image.o:C:/upp/uppsrc/Draw/iml_source.h:33: first defined here
...
...
After executing TheIDE, compiling It was success at first time. I modify something then compile it was fail.
It both happened on Ubuntu and Windows using gcc.
The Attachment is a sample code.
But I move the definition
#define IMAGECLASS MyImages
#define IMAGEFILE <Image01/images.iml>
#include <Draw/iml.h>
from .h to .cpp. then it is success all the time.
so...maybe this is not a bug?
Thank you for creating so useful tool.
-
Attachment: Image01.zip
(Size: 1.66KB, Downloaded 345 times)
[Updated on: Mon, 29 December 2008 10:45] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu May 23 16:56:48 CEST 2024
Total time taken to generate the page: 0.02236 seconds
|