Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » UWord class: link problem
UWord class: link problem [message #43401] Fri, 25 July 2014 11:25 Go to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I am having weird problems that I am not able to explain. Let me spend some words to let you understand my problem.
With my U++ 7282, MSVC 9 compiler, I can compile and run the UWord package.
I would like to use that class in my own app (I like the pdf export function). I splitted the UWord.cpp in a UWord.h that looks like:
#ifndef _UWord_UWord_h_
#define _UWord_UWord_h_
#include <RichEdit/RichEdit.h>
#include <PdfDraw/PdfDraw.h>

using namespace Upp;

//#define IMAGECLASS UWordImg
//#define IMAGEFILE  <UWord/UWord.iml>
//#include <Draw/iml.h>
//I use my own pdf icon

class UWord : public TopWindow {
public:
	virtual void DragAndDrop(Point, PasteClip& d);
	virtual void FrameDragAndDrop(Point, PasteClip& d);

protected:
	RichEdit   editor;
	MenuBar    menubar;
	ToolBar    toolbar;
	StatusBar  statusbar;
	String     filename;

	static LRUList& lrufile() { static LRUList l; return l; }

	void OpenFile(const String& fn);
	void New();
	void Open();
	void Save0();
	void Save();
	void SaveAs();
	void Print();
	void Pdf();
	void About();
	void Destroy();
	void SetBar();
	void FileBar(Bar& bar);
	void AboutMenu(Bar& bar);
	void MainMenu(Bar& bar);
	void MainBar(Bar& bar);

public:
	typedef UWord CLASSNAME;

	void Load(const String& filename);
	static void SerializeApp(Stream& s);

	UWord();
};
#endif

The other file, UWord.cpp, contains the rest of the original UWord.cpp file with, of course, the line
#include "UWord.h" 


The original package splitted in two files continue to compile and run perfectly.

To integrate in in my app I have:
1) commented
[code]
GUI_APP_MAIN
{/code]
in UWord.cpp

2) added UWord.h and UWord.cpp to my app;

3) added
#include "UWord.h" 

in those few cpp file that use the class UWord.

When compile there are no syntax error. However appear a lot of link error regarding PdfDraw

UWord.obj : error LNK2019: unresolved external symbol "public: void __thiscall Upp::PdfDraw::Init(int,in
	t,int,bool)" (?Init@PdfDraw@Upp@@QAEXHHH_N@Z) referenced in function "public: __thiscall Upp::PdfDraw::P
	dfDraw(struct Upp::Size_<int>,bool)" (??0PdfDraw@Upp@@QAE@U?$Size_@H@1@_N@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall Upp::Pdf
	Draw::GetInfo(void)const " (?GetInfo@PdfDraw@Upp@@UBEKXZ)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual struct Upp::Size_<int> __thiscall
	 Upp::PdfDraw::GetPageSize(void)const " (?GetPageSize@PdfDraw@Upp@@UBE?AU?$Size_@H@2@XZ)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Sta
	rtPage(void)" (?StartPage@PdfDraw@Upp@@UAEXXZ)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::End
	Page(void)" (?EndPage@PdfDraw@Upp@@UAEXXZ)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Beg
	inOp(void)" (?BeginOp@PdfDraw@Upp@@UAEXXZ)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::End
	Op(void)" (?EndOp@PdfDraw@Upp@@UAEXXZ)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Off
	setOp(struct Upp::Point_<int>)" (?OffsetOp@PdfDraw@Upp@@UAEXU?$Point_@H@2@@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall Upp::PdfDraw::Cli
	pOp(struct Upp::Rect_<int> const &)" (?ClipOp@PdfDraw@Upp@@UAE_NABU?$Rect_@H@2@@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall Upp::PdfDraw::Cli
	poffOp(struct Upp::Rect_<int> const &)" (?ClipoffOp@PdfDraw@Upp@@UAE_NABU?$Rect_@H@2@@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall Upp::PdfDraw::Exc
	ludeClipOp(struct Upp::Rect_<int> const &)" (?ExcludeClipOp@PdfDraw@Upp@@UAE_NABU?$Rect_@H@2@@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall Upp::PdfDraw::Int
	ersectClipOp(struct Upp::Rect_<int> const &)" (?IntersectClipOp@PdfDraw@Upp@@UAE_NABU?$Rect_@H@2@@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall Upp::PdfDraw::IsP
	aintingOp(struct Upp::Rect_<int> const &)const " (?IsPaintingOp@PdfDraw@Upp@@UBE_NABU?$Rect_@H@2@@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Dra
	wRectOp(int,int,int,int,class Upp::Color)" (?DrawRectOp@PdfDraw@Upp@@UAEXHHHHVColor@2@@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Dra
	wImageOp(int,int,int,int,class Upp::Image const &,struct Upp::Rect_<int> const &,class Upp::Color)" (?Dr
	awImageOp@PdfDraw@Upp@@UAEXHHHHABVImage@2@ABU?$Rect_@H@2@VColor@2@@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Dra
	wLineOp(int,int,int,int,int,class Upp::Color)" (?DrawLineOp@PdfDraw@Upp@@UAEXHHHHHVColor@2@@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Dra
	wPolyPolylineOp(struct Upp::Point_<int> const *,int,int const *,int,int,class Upp::Color,class Upp::Colo
	r)" (?DrawPolyPolylineOp@PdfDraw@Upp@@UAEXPBU?$Point_@H@2@HPBHHHVColor@2@2@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Dra
	wPolyPolyPolygonOp(struct Upp::Point_<int> const *,int,int const *,int,int const *,int,class Upp::Color,
	int,class Upp::Color,unsigned __int64,class Upp::Color)" (?DrawPolyPolyPolygonOp@PdfDraw@Upp@@UAEXPB
	U?$Point_@H@2@HPBHH1HVColor@2@H2_K2@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Dra
	wArcOp(struct Upp::Rect_<int> const &,struct Upp::Point_<int>,struct Upp::Point_<int>,int,class Upp::Col
	or)" (?DrawArcOp@PdfDraw@Upp@@UAEXABU?$Rect_@H@2@U?$Point_@H@2@1HVColor@2@@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Dra
	wEllipseOp(struct Upp::Rect_<int> const &,class Upp::Color,int,class Upp::Color)" (?DrawEllipseOp@PdfDra
	w@Upp@@UAEXABU?$Rect_@H@2@VColor@2@H1@Z)
UWord.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Upp::PdfDraw::Dra
	wTextOp(int,int,int,wchar_t const *,class Upp::Font,class Upp::Color,int,int const *)" (?DrawTextOp@PdfD
	raw@Upp@@UAEXHHHPB_WVFont@2@VColor@2@HPBH@Z)
UWord.obj : error LNK2019: unresolved external symbol "public: class Upp::String __thiscall Upp::PdfDraw
	::Finish(void)" (?Finish@PdfDraw@Upp@@QAE?AVString@2@XZ) referenced in function "protected: void __thisc
	all UWord::Pdf(void)" (?Pdf@UWord@@IAEXXZ)
C:\upp\out\MyApps\MSC9.Gui\Vega6.exe : fatal error LNK1120: 22 unresolved externals


Does anybody knows why? It seems there is some collision with my code somewhere. What may prevent PdfDraw to work correctly?

Thanks a lot,
Luigi
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How do I compile umk.exe without theide (freebsd)?
Next Topic: [TASK] Linux tar distribution should have someting like configure script
Goto Forum:
  


Current Time: Thu Apr 25 07:34:19 CEST 2024

Total time taken to generate the page: 0.02292 seconds