dev-cpp-users Mailing List for Dev-C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
|
2
(5) |
3
(3) |
4
|
5
(3) |
6
(3) |
7
(2) |
8
(12) |
9
(10) |
10
|
11
(1) |
12
|
13
|
14
(1) |
15
|
16
|
17
(1) |
18
(4) |
19
|
20
|
21
(2) |
22
|
23
(4) |
24
(4) |
25
(1) |
26
(1) |
27
(1) |
28
(2) |
29
(2) |
30
|
31
|
|
|
From: Per W. <pw...@ia...> - 2006-08-29 06:21:33
|
I think you have missed something fundamental here. What you call DB tools seems to be the administrative tools used to create databases and tables, optimize queries, set up privileges etc. That is a completely separate issue from retrieving and using the data. You normally don't manage a database using ODBC. The ODBC interface isn't even complete enough to retrieve all meta information about tables, queries, views etc. You use it to insert/update/delete/query data. While ODBC might not be the hottest item in the world, it is one of severeal methods of accessing SQL databases. Note that when accessing the database, there is no requirement to access individual tables. You might just as well use ODBC to access pre-designed views in the database. Your mail can almost be read as if it is the DB admins that are on call 24/7 that retrieves the data and returns it to the applications. Now that doesn't seem like a very fast interface ;) /Per W On Tue, 29 Aug 2006, Thomas O'Hare wrote: > I have some data handling experience. > > My experience says ODBC is out as it is really slow, and depending on > the tools used, can be quite expensive. > > I have taken the opposite approach and use higher level tools that can > do data better then trying by yourself. I am using Dev-C++ to do the > dirty work and pass the results of my functions to these higher level > languages that can process data tables much better then I ever could in > my own C programs. > > IOW, let DB tools do DB work, let low level tools do low level work. > Just make the 2 communicate well with each other via your own interface. > > There are many technologies that are better then ODBC. And beware of > Access. MS flat out stipulates it was never intended as a "true" > multi-user database but rather as a simple data store for simple operations. > > Remember, if you get into real data handling you have to look at record > or table locks, keeping data integrity, maybe working with DB triggers, > relational tables, SQL standards, indexes and a whole host of other issues. > > There is a reason people use specific database tools for specific > purposes. It can depend on how heavy of a load it can take on a high > end web server, or how secure the data must be maintained. > > I just wanted to throw this into the mix to make sure some people better > understand true database concepts as opposed to simple data stores. > Remember, the high end DB admins get paid very well and are on call 24/7 > -- and that is all they do, manage DB's. > > Thanks, > ~ Thomas O'Hare ~ > President, RedTile, Inc. - DBA: RedTile Software > Web, Wireless, Network, Database & Systems Software > +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/ > Operations Manager; Virtual FoxPro User Group > To...@VF... ; http://www.VFUG.Org/ > > > rodolfo d'Ettorre wrote: > > Hi, > > > > I have not tried it yet, but WxWidget includes a ODBC library which may > > allow you to work with both MSSQL and MSAccess. > > > > Good Luck > > > > Rodolfo d'Ettorre > > > > > > > > > >> From: Andrea <ab...@li...> > >> To: dev...@li... > >> Subject: [Dev-C++] accessing mdb/mssql with dev-cpp > >> Date: Sun, 27 Aug 2006 15:48:03 +0200 > >> > >> > >> Hi everybody, > >> I need to access some tables from (a mess of) .mdb > >> files (and later I'll be required to access data in a > >> MSSQL server). Please don't tell me I can use > >> SQLite or MySQL for I did as long as I could (BTW the > >> program I built using devcpp/sqlite worked about 10 > >> times faster than the one developed by another guy > >> with vb; but dumping results to a text file which took > >> less than a minute to be imported by a DTS is now > >> considered unacceptable). > >> I googled around but I found nothing usable about it. > >> Can anyone address me to tutorials/articles (better > >> if with some sample code) covering the topic? > >> > >> Thanks a lot > >> > >> Andrea > >> > >> > >> > >> > >> ------------------------------------------------------------------------- > >> Using Tomcat but need to do more? Need to support web services, security? > >> Get stuff done quickly with pre-integrated technology to make your job > >> easier > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >> _______________________________________________ > >> Dev-cpp-users mailing list > >> Dev...@li... > >> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Thomas O'H. <To...@Re...> - 2006-08-29 05:31:55
|
I have some data handling experience. My experience says ODBC is out as it is really slow, and depending on the tools used, can be quite expensive. I have taken the opposite approach and use higher level tools that can do data better then trying by yourself. I am using Dev-C++ to do the dirty work and pass the results of my functions to these higher level languages that can process data tables much better then I ever could in my own C programs. IOW, let DB tools do DB work, let low level tools do low level work. Just make the 2 communicate well with each other via your own interface. There are many technologies that are better then ODBC. And beware of Access. MS flat out stipulates it was never intended as a "true" multi-user database but rather as a simple data store for simple operations. Remember, if you get into real data handling you have to look at record or table locks, keeping data integrity, maybe working with DB triggers, relational tables, SQL standards, indexes and a whole host of other issues. There is a reason people use specific database tools for specific purposes. It can depend on how heavy of a load it can take on a high end web server, or how secure the data must be maintained. I just wanted to throw this into the mix to make sure some people better understand true database concepts as opposed to simple data stores. Remember, the high end DB admins get paid very well and are on call 24/7 -- and that is all they do, manage DB's. Thanks, ~ Thomas O'Hare ~ President, RedTile, Inc. - DBA: RedTile Software Web, Wireless, Network, Database & Systems Software +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/ Operations Manager; Virtual FoxPro User Group To...@VF... ; http://www.VFUG.Org/ rodolfo d'Ettorre wrote: > Hi, > > I have not tried it yet, but WxWidget includes a ODBC library which may > allow you to work with both MSSQL and MSAccess. > > Good Luck > > Rodolfo d'Ettorre > > > > >> From: Andrea <ab...@li...> >> To: dev...@li... >> Subject: [Dev-C++] accessing mdb/mssql with dev-cpp >> Date: Sun, 27 Aug 2006 15:48:03 +0200 >> >> >> Hi everybody, >> I need to access some tables from (a mess of) .mdb >> files (and later I'll be required to access data in a >> MSSQL server). Please don't tell me I can use >> SQLite or MySQL for I did as long as I could (BTW the >> program I built using devcpp/sqlite worked about 10 >> times faster than the one developed by another guy >> with vb; but dumping results to a text file which took >> less than a minute to be imported by a DTS is now >> considered unacceptable). >> I googled around but I found nothing usable about it. >> Can anyone address me to tutorials/articles (better >> if with some sample code) covering the topic? >> >> Thanks a lot >> >> Andrea >> >> >> >> >> ------------------------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job >> easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> Dev-cpp-users mailing list >> Dev...@li... >> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Per W. <pw...@ia...> - 2006-08-28 06:47:34
|
I have been usig wxWidgets together with MySQL and it has worked quite ok. The only work I have done against a Access database is to transfer some information from Access to MySQL. /Per W On Mon, 28 Aug 2006, rodolfo d'Ettorre wrote: > Hi, > > I have not tried it yet, but WxWidget includes a ODBC library which may > allow you to work with both MSSQL and MSAccess. > > Good Luck > > Rodolfo d'Ettorre > > > > > >From: Andrea <ab...@li...> > >To: dev...@li... > >Subject: [Dev-C++] accessing mdb/mssql with dev-cpp > >Date: Sun, 27 Aug 2006 15:48:03 +0200 > > > > > >Hi everybody, > >I need to access some tables from (a mess of) .mdb > >files (and later I'll be required to access data in a > >MSSQL server). Please don't tell me I can use > >SQLite or MySQL for I did as long as I could (BTW the > >program I built using devcpp/sqlite worked about 10 > >times faster than the one developed by another guy > >with vb; but dumping results to a text file which took > >less than a minute to be imported by a DTS is now > >considered unacceptable). > >I googled around but I found nothing usable about it. > >Can anyone address me to tutorials/articles (better > >if with some sample code) covering the topic? > > > >Thanks a lot > > > >Andrea > > > > > > > > > >------------------------------------------------------------------------- > >Using Tomcat but need to do more? Need to support web services, security? > >Get stuff done quickly with pre-integrated technology to make your job > >easier > >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: rodolfo d'E. <rod...@ho...> - 2006-08-28 00:08:37
|
Hi, I have not tried it yet, but WxWidget includes a ODBC library which may allow you to work with both MSSQL and MSAccess. Good Luck Rodolfo d'Ettorre >From: Andrea <ab...@li...> >To: dev...@li... >Subject: [Dev-C++] accessing mdb/mssql with dev-cpp >Date: Sun, 27 Aug 2006 15:48:03 +0200 > > >Hi everybody, >I need to access some tables from (a mess of) .mdb >files (and later I'll be required to access data in a >MSSQL server). Please don't tell me I can use >SQLite or MySQL for I did as long as I could (BTW the >program I built using devcpp/sqlite worked about 10 >times faster than the one developed by another guy >with vb; but dumping results to a text file which took >less than a minute to be imported by a DTS is now >considered unacceptable). >I googled around but I found nothing usable about it. >Can anyone address me to tutorials/articles (better >if with some sample code) covering the topic? > >Thanks a lot > >Andrea > > > > >------------------------------------------------------------------------- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job >easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Andrea <ab...@li...> - 2006-08-27 13:49:26
|
Hi everybody, I need to access some tables from (a mess of) .mdb files (and later I'll be required to access data in a MSSQL server). Please don't tell me I can use SQLite or MySQL for I did as long as I could (BTW the program I built using devcpp/sqlite worked about 10 times faster than the one developed by another guy with vb; but dumping results to a text file which took less than a minute to be imported by a DTS is now considered unacceptable). I googled around but I found nothing usable about it. Can anyone address me to tutorials/articles (better if with some sample code) covering the topic? Thanks a lot Andrea |
From: Per W. <pw...@ia...> - 2006-08-26 12:37:54
|
There are no data type longdouble. There are a data type long double. Some compilers will support it, some will ignore the long keyword and treat it as a double. MinGW - the compiler used by Dev-C++ - does support a long double data type. You can easily check if a compiler supports it by doing: if (sizeof(long double) !=3D sizeof(double)) { std::cout << "Long double supported" << std::endl; } Are your program really needing a long double to be numerically stable, or is the program incorrectly written, resulting in the errors? Note that when using printf() for emitting a double or long double, the formatting string differs. If the formatting string is for a double, but you push a long double, the printout will be completely wrong. Same thing if the formatting string specifies a long double, but your argument is a double. /Per W On Fri, 25 Aug 2006, Victor Romero wrote: > Hi, I write to you due to I have some problems with a program. > > This program was made for C++, and this program uses many classes. > > For this program the typedata that was used is longdoble, somebody have t= old > me that > DevC++ doesn't know this typedata. In order to solve this, a definition w= as > made but mi problem still the but mi problem still there. > > The program runs right, but the solution=B4s numbers are illogical. > > > -- > Victor Romero V. > |
From: Victor R. <rom...@gm...> - 2006-08-25 21:10:40
|
Hi, I write to you due to I have some problems with a program. This program was made for C++, and this program uses many classes. For this program the typedata that was used is longdoble, somebody have tol= d me that DevC++ doesn't know this typedata. In order to solve this, a definition was made but mi problem still the but mi problem still there. The program runs right, but the solution=B4s numbers are illogical. --=20 Victor Romero V. |
From: <Ber...@eu...> - 2006-08-24 12:40:53
|
Per Wustermark wrote: > The easiest way to instantiate classes defined in a DLL is to=20 > give the DLL > file a factory function, i.e. a function that returns new=20 > DllClass(xxx); OK, I tried the following now: dll.h: DllClass* DLLIMPORT createDllClass(); Dll.cpp: DllClass* createDllClass() { return new DllClass; } In my program using the dll: HMODULE hMod =3D LoadLibrary("mydll.dll"); if (hMod=3D=3DNULL) printf("NOT LOADED\n"); else printf("LOADED\n"); typedef DllClass* (*PCreate) (); PCreate createDC=3D(PCreate)::GetProcAddress = (hMod,"_Z14createDllClassv"); DllClass *pD=3DcreateDC(); Now I can access interal public variables of the class, f.e.: printf("Value v: %v\n",pD->v"); But not execute a void of this class: pD->test(); gives a linker error for an unresolved symbol. When I try: void (FAR __stdcall *(test))()=3DNULL; test=3D (void (__stdcall *)())GetProcAddress = (hMod,"_ZN8DllClass5testEv"); I can execute: test2(); But in the function test there is something like: void DllClass::test() { v=3Dv+10; printf("Value of v: %d\n",v); } In the constructor v is set to 5, so it must be 15 here. But I get either an undefined very big value or the program crashes. = Obviously the memory is not allocated. So I think that the instance of the class represented by the pointer pD = has nothing to do with the the second GetProcAddress to get access to = the void test() in the class. I think it is something like a static call = DllClass::test(), but this is not what I like to get. Any more suggestions? Thank you for tips, Bernd |
From: Per W. <pw...@ia...> - 2006-08-24 11:22:37
|
The easiest way to instantiate classes defined in a DLL is to give the DLL file a factory function, i.e. a function that returns new DllClass(xxx); The naming of exported symbols is called name mangling. All C++ compilers uses name mangling (but not identical) to facilitate type-safe linking. The symbols are decorated with a number of extra characters that tells data types, return values, parameters, calling convention, code generation etc. In your example code, you are using malloc. C++ program should normally use the new operator instead of malloc. /Per W On Thu, 24 Aug 2006, M=FCnt, Bernd wrote: > Hi together, > I made a DLL in the following way (simplified example just to explain wha= t is the problem): > dll.h: > #ifndef _DLL_H_ > #define _DLL_H_ > > #if BUILDING_DLL > # define DLLIMPORT __declspec (dllexport) > #else /* Not BUILDING_DLL */ > # define DLLIMPORT __declspec (dllimport) > #endif /* Not BUILDING_DLL */ > > class DLLIMPORT DllClass > { > public: > DllClass(); > virtual ~DllClass(void); > void testVoid(); > }; > ------------------------------------------------- > dll.cpp: > > #include "dll.h" > #include <windows.h> > #include <iostream> > > DllClass::DllClass() {} > DllClass::~DllClass () {} > void DllClass::test() { > printf("testFunction called!\n"); > } > > BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */= , > DWORD reason /* Reason this function is bei= ng called. */ , > LPVOID reserved /* Not used. */ ) { > return true; > } > ------------------------------------------------- > > So far, so good, I could compile it with gcc and got a dll.dll as output. > dumpbin /exports dll.dll gives the following output: > ordinal hint RVA name > > 1 0 000011D0 _Z5testFv > 2 1 000011F0 _ZN8DllClass4testEv > 4 2 00001250 _ZN8DllClassC1Ev > 5 3 00001230 _ZN8DllClassC2Ev > 6 4 00001290 _ZN8DllClassD0Ev > 7 5 00001280 _ZN8DllClassD1Ev > 8 6 00001270 _ZN8DllClassD2Ev > 9 7 00041C9C _ZTV8DllClass > > So, the Class and ist included void are exported. > [Question beside: Why have the symbols such cryptic names. Do I have any = influence to rename them just to "DllClass" etc.?] > > No I made a host application: > main.cpp: > ------------------------------- > #include <cstdlib> > #include <iostream> > #include <windows.h> > #include "dll.h" > > using namespace std; > > int main(int argc, char *argv[]) { > HMODULE hMod =3D LoadLibrary("dll.dll"); > if (hMod=3D=3DNULL) {printf("DLL NOT LOADED\n"); return 1} else printf("D= LL LOADED\n"); > > DllClass *pDllClass =3D (DllClass *) malloc (sizeof (DllClass)); > if (NULL =3D=3D pDllClass) {printf ("Memory allocation failed\n");return = 1;} else printf("Memory allocated\n"); > > typedef void (WINAPI * PCTOR) (); > PCTOR pDLLClass =3D (PCTOR) GetProcAddress (hMod, "_ZTV8DllClass"); > if (NULL =3D=3D pDLLClass) {printf ("GetProcAddress failed\n");} else pr= intf ("DLL ProcAddress success\n"); > ------------------------------------- > But now? How to make an instance of this class? > I found this hint: > https://secure.codeproject.com/dll/classesexportedusingLL.asp > __asm { MOV ECX, pDLLClass } > pDLLClass(); > > But the assember syntax is for Visual C++, not working with gcc. > I tried: > asm("MOV ECX, pDLLClass"); > But this does not compile: > "too many memory references for `mov'" > > Sorry, I've got no experience in programming assembler on a X86 machine, = the last time I did assembler programming was on a ZX81 von VC 64 some 20 y= ears ago ;-) > > Thank you for any tips how to get an instance of a class which is defined= in a dll, Bernd > > -- > Bernd M=FCnt Durchwahl: 030/69032-509 > euroscript Deutschland GmbH Zentrale: 030/69032-300 > Abteilung IT-Management Fax: 030/69032-505 > Alt-Moabit 91 Mail: Ber...@eu... > 10559 Berlin Web: http://www.euroscript.de > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job ea= sier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: <Ber...@eu...> - 2006-08-24 09:34:15
|
Hi together, I made a DLL in the following way (simplified example just to explain = what is the problem): dll.h: #ifndef _DLL_H_ #define _DLL_H_ #if BUILDING_DLL # define DLLIMPORT __declspec (dllexport) #else /* Not BUILDING_DLL */ # define DLLIMPORT __declspec (dllimport) #endif /* Not BUILDING_DLL */ class DLLIMPORT DllClass { public: DllClass(); virtual ~DllClass(void); void testVoid(); }; ------------------------------------------------- dll.cpp: #include "dll.h" #include <windows.h> #include <iostream> DllClass::DllClass() {} DllClass::~DllClass () {} void DllClass::test() { printf("testFunction called!\n"); } BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. = */ , DWORD reason /* Reason this function is = being called. */ , LPVOID reserved /* Not used. */ ) { return true; } ------------------------------------------------- So far, so good, I could compile it with gcc and got a dll.dll as = output. dumpbin /exports dll.dll gives the following output: ordinal hint RVA name 1 0 000011D0 _Z5testFv 2 1 000011F0 _ZN8DllClass4testEv 4 2 00001250 _ZN8DllClassC1Ev 5 3 00001230 _ZN8DllClassC2Ev 6 4 00001290 _ZN8DllClassD0Ev 7 5 00001280 _ZN8DllClassD1Ev 8 6 00001270 _ZN8DllClassD2Ev 9 7 00041C9C _ZTV8DllClass So, the Class and ist included void are exported. [Question beside: Why have the symbols such cryptic names. Do I have any = influence to rename them just to "DllClass" etc.?] No I made a host application: main.cpp: ------------------------------- #include <cstdlib> #include <iostream> #include <windows.h> #include "dll.h" using namespace std; int main(int argc, char *argv[]) { HMODULE hMod =3D LoadLibrary("dll.dll"); if (hMod=3D=3DNULL) {printf("DLL NOT LOADED\n"); return 1} else = printf("DLL LOADED\n"); DllClass *pDllClass =3D (DllClass *) malloc (sizeof (DllClass)); if (NULL =3D=3D pDllClass) {printf ("Memory allocation failed\n");return = 1;} else printf("Memory allocated\n"); typedef void (WINAPI * PCTOR) (); PCTOR pDLLClass =3D (PCTOR) GetProcAddress (hMod, "_ZTV8DllClass"); if (NULL =3D=3D pDLLClass) {printf ("GetProcAddress failed\n");} else = printf ("DLL ProcAddress success\n"); ------------------------------------- But now? How to make an instance of this class? I found this hint: https://secure.codeproject.com/dll/classesexportedusingLL.asp __asm { MOV ECX, pDLLClass } pDLLClass(); But the assember syntax is for Visual C++, not working with gcc. I tried: asm("MOV ECX, pDLLClass"); But this does not compile: "too many memory references for `mov'" Sorry, I've got no experience in programming assembler on a X86 machine, = the last time I did assembler programming was on a ZX81 von VC 64 some = 20 years ago ;-) Thank you for any tips how to get an instance of a class which is = defined in a dll, Bernd --=20 Bernd M=FCnt Durchwahl: 030/69032-509 euroscript Deutschland GmbH Zentrale: 030/69032-300 Abteilung IT-Management Fax: 030/69032-505 Alt-Moabit 91 Mail: Ber...@eu... 10559 Berlin Web: http://www.euroscript.de |
From: <buh...@16...> - 2006-08-24 00:40:34
|
dev...@li... 写道: > Send Dev-cpp-users mailing list submissions to > dev...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > or, via email, send a message with subject or body 'help' to > dev...@li... > > You can reach the person managing the list at > dev...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Dev-cpp-users digest..." > > > Today's Topics: > > 1. **Help Please** (can altýngöz) > 2. Re: *Help Please* (Austin Scholze) > 3. Re: *Help Please* (Per Westermark) > 4. When debugging, how can I do? (wmaple) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 23 Aug 2006 07:55:04 -0700 (PDT) > From: can "altýngöz" <can...@ya...> > Subject: [Dev-C++] **Help Please** > To: dev...@li... > Message-ID: <200...@we...> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > I am really sorry to disturb you.I would be really glad if you help me.It is a simple question indeed.I have installed Bloodshed Dev-C++ 4.9.9.2 in my computer. I will study to learn C programming language,but here is my problem: > > I can not see the result of my program.When I execute my program a console window will pop up,flash some text and disappear. > > I would be very thankful if u can help me. > Waiting for your reply,please reply back. > > Best regards > > > --------------------------------- > Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://sourceforge.net/mailarchive/forum.php?forum=dev-cpp-users/attachments/20060823/f8e345a3/attachment.html > > ------------------------------ > > Message: 2 > Date: Wed, 23 Aug 2006 11:06:41 -0400 > From: "Austin Scholze" <Aus...@co...> > Subject: Re: [Dev-C++] *Help Please* > To: <Dev...@li...> > Message-ID: <002001c6c6c5$c0038170$6401a8c0@AUSTINSCOMP> > Content-Type: text/plain; charset="iso-8859-1" > > try adding: > > System("pause"); > > > at the end of your code. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://sourceforge.net/mailarchive/forum.php?forum=dev-cpp-users/attachments/20060823/ca67dc7d/attachment.html > > ------------------------------ > > Message: 3 > Date: Wed, 23 Aug 2006 17:42:26 +0200 (CEST) > From: Per Westermark <pw...@ia...> > Subject: Re: [Dev-C++] *Help Please* > To: Austin Scholze <Aus...@co...> > Cc: Dev...@li... > Message-ID: > <Pin...@ia...> > Content-Type: TEXT/PLAIN; charset=US-ASCII > > But make sure you spell it > system("pause"); > > i.e. not capitalized. > > /Per W > > On Wed, 23 Aug 2006, Austin Scholze wrote: > > >> try adding: >> >> System("pause"); >> >> >> at the end of your code. >> > > > > > ------------------------------ > > Message: 4 > Date: Thu, 24 Aug 2006 00:13:23 +0800 > From: "wmaple" <wm...@12...> > Subject: [Dev-C++] When debugging, how can I do? > To: "devc++" <dev...@li...> > Message-ID: <200...@12...> > Content-Type: text/plain; charset="gb2312" > > > Hi, > I am writting a console application. When debugging in dev-c++, there is no console window to pop out. How can I give data to > my program or observe its output? > Thanks for your reply. > -------------- > wmaple > 2006-08-24 > > > > > > ------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > ------------------------------ > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > End of Dev-cpp-users Digest, Vol 3, Issue 17 > ******************************************** > > > > add the following statements in your file containing the main() function: #include <cstdlib>// for c++ #include <stdlib.h> // for c int main() { // your codes here system("PAUSE"); // the statement will pause the console window when popped out return 0; } To enter your command line parameters, you should "run"-> "parameters", a window will pop-up, and you can enter the parameters that you need. |
From: wmaple <wm...@12...> - 2006-08-23 16:13:44
|
Hi, I am writting a console application. When debugging in dev-c++, there is no console window to pop out. How can I give data to my program or observe its output? Thanks for your reply. -------------- wmaple 2006-08-24 |
From: Per W. <pw...@ia...> - 2006-08-23 15:42:39
|
But make sure you spell it system("pause"); i.e. not capitalized. /Per W On Wed, 23 Aug 2006, Austin Scholze wrote: > try adding: > > System("pause"); > > > at the end of your code. |
From: Austin S. <Aus...@co...> - 2006-08-23 15:07:24
|
try adding: System("pause"); at the end of your code. |
From: can a. <can...@ya...> - 2006-08-23 14:55:14
|
Hi, I am really sorry to disturb you.I would be really glad if you help me.It is a simple question indeed.I have installed Bloodshed Dev-C++ 4.9.9.2 in my computer. I will study to learn C programming language,but here is my problem: I can not see the result of my program.When I execute my program a console window will pop up,flash some text and disappear. I would be very thankful if u can help me. Waiting for your reply,please reply back. Best regards --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. |
From: Per W. <pw...@ia...> - 2006-08-21 16:00:40
|
I don't know what you did expect. First of all, there are no standard that tells how muh extra data that a compiler should/may add to the size of an object. Extra data is needed for RTTI, virtual methods etc. One other important factor is the avoidance of zero-size objects. Let's say that you have an object of zero size. Then you allocate an array of 100 such objects. How would you now iterate through the array? If the object has zero size, each element of the array would have the same address since the whole array would be zero size. /Per W On Mon, 21 Aug 2006, karunakar A.K. wrote: > Dear All > > Output of the following program is 1. Please explain me the reason. > > > with regards > karunakar > > > > > #include <iostream.h> > #include <conio.h> > > class Object > { > public: > Object() { } > }; > void main() > { > cout << "\nSize = " << sizeof(Object); > } > > > --------------------------------- > Here's a new way to find what you're looking for - Yahoo! Answers > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW |
From: karunakar A.K. <k_k...@ya...> - 2006-08-21 14:51:25
|
Dear All Output of the following program is 1. Please explain me the reason. with regards karunakar #include <iostream.h> #include <conio.h> class Object { public: Object() { } }; void main() { cout << "\nSize = " << sizeof(Object); } --------------------------------- Here's a new way to find what you're looking for - Yahoo! Answers Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW |
From: Per W. <pw...@ia...> - 2006-08-18 13:47:25
|
Note that when you build a dll file, you can also build an export library. The export library is then lined with an application to make the application able to use the exported functions of a DLL without knowing that the files resides in a DLL file. You can also use the DLL file without having the applicatino link with the export library. Then you have to manually open the DLL file and then retrieve pointers to the exported symbols in the DLL file. The export library just contains small stub functions to perform the dynamic "hookup" with an exported symbol in the DLL file. It is possible to make use of both export libraries and "manual" dynamic linking. One such setup is where the main program exports a number of symbols using a export library. The DLL file is created using the application export library. The application may then locate a DLL and load it and manually connect to exported functions in the DLL. On the other hand, the DLL file may make use of exported functions in the main application - for example to log progress or register new menu alternatives. Right now I'm working flat out with a very important project, so I can't make the time to set up a demo project for use. However, even if this list is quite silent, there should be a number of other people on the list who can help. /Per W On Fri, 18 Aug 2006, Thomas O'Hare wrote: > I have "yet" to be able to export my own functions when trying to use > WinPCap SDK. > > I am not sure this will be enough, but maybe if someone can write an > "Hello World" DLL using a UDF I can finally see the light? I just want > to see it work from an external program: > > MyFunc(@cBuffer) > > If cBuffer return "Hello World" I will be a happy camper. > > I know there is something severely stupid I am overlooking. Now I just > must determine if it is my working environment or I have an option set > wrong. > > OK, laugh, but I just need to figure out what really stupid mistake I mad= e. > > In WinPCap it "seemed" that exported functions had to be in a LIB file > to work. That is the only way I could get them to work in their samples. > > I am not sure what I am asking for will relate to WinPCap or not, but if > someone has a few minutes... > > >From what I see on both this list & the WinPCap list, exporting > functions seems to be a major topic. So at least I can have some > comfort.... > > I also appear to see a glimpse of maybe the key is that many use MS > Visual Studio, MS .Net, and of course Dev-C++. IOW, so many > environments it is easy to create the wrong environment. > > I guess the best way, "if" someone can do this for me, is to zip the > project and sent it to me off list. That is unless anyone else really > wants to see it too. > > Way Too Frustrated & Growing too old too fast, > ~ Thomas O'Hare ~ > President, RedTile, Inc. - DBA: RedTile Software > Web, Wireless, Network, Database & Systems Software > +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/ > Operations Manager; Virtual FoxPro User Group > To...@VF... ; http://www.VFUG.Org/ > > > HongQuan.Zhang wrote: > > Hi, Thomas: > > =09In fact,you don't have to add a def file to the project made by > > Dev-Cpp ,you can refer to the attachment ,which is a email Per Westerm= ark > > send out and this perfect mail help me to solve my problem! > > =09Hope this can help you! > > > > HongQuan > > > > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > > =B7=A2=BC=FE=C8=CB: dev...@li... > > [mailto:dev...@li...] =B4=FA=B1=ED Thoma= s O'Hare > > =B7=A2=CB=CD=CA=B1=BC=E4: 2006=C4=EA8=D4=C211=C8=D5 21:38 > > =CA=D5=BC=FE=C8=CB: dev...@li... > > =B3=AD=CB=CD: Dev...@li... > > =D6=F7=CC=E2: Re: [Dev-C++] How to build a DLL with def file=A3=BF > > > > Hong, et. al. > > > > I used the common way as described below. But I swear I get different > > results as my project continues. > > > > I had added the DEF file to the Linker and all was OK. Then at some po= int I > > had to remove the DEF from the Linker to compile. > > > > Either I overlooked something or something I am clueless about is going= on. > > > > So, what is the "best" way to use a DEF file to export functions in > > Dev-C++??? Not only a code sample but also where to list the file. > > > > I am sure it is just me but any help will be appreciated. I am burning = up > > way too much time on this. > > > > Thanks, > > ~ Thomas O'Hare ~ > > President, RedTile, Inc. - DBA: RedTile Software Web, Wireless, Network= , > > Database & Systems Software > > +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/ > > Operations Manager; Virtual FoxPro User Group To...@VF... ; > > http://www.VFUG.Org/ > > > > > > HongQuan.Zhang wrote: > >> Hi=A3=ACAll: > >> =09I create a dll project and I want to export some function such as > >> =09void Test(); > >> =09I add a def file like def file in MSVC,and of course I add a linker > >> opiton "-def test.def" > >> =09 in project options->parameter->linker > >> =09In the file Test.def,there are only several code as follow: > >> > >> ; test.def : Declares the module parameters for the DLL. > >> > >> LIBRARY "test" > >> DESCRIPTION 'test Windows Dynamic Link Library' > >> > >> EXPORTS > >> ; Explicit exports can go here > >> Test > >> > >> > >> When I compile the project and get some error: > >> [Linker error] undefined reference to `Test' > >> > >> > >> > >> > >> > >> ---------------------------------------------------------------------- > >> -- > >> > >> ---------------------------------------------------------------------- > >> --- Using Tomcat but need to do more? Need to support web services, > >> security? > >> Get stuff done quickly with pre-integrated technology to make your job > >> easier Download IBM WebSphere Application Server v.1.0.1 based on > >> Apache Geronimo > >> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&da= t=3D1216 > >> 42 > >> > >> > >> ---------------------------------------------------------------------- > >> -- > >> > >> _______________________________________________ > >> Dev-cpp-users mailing list > >> Dev...@li... > >> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > -----------------------------------------------------------------------= - > > > > Subject: > > Re: [Dev-C++] ??: ??: How to build a DLL with def file? > > From: > > "Per Westermark" <pw...@ia...> > > Date: > > Wed, 9 Aug 2006 19:41:00 +0800 > > To: > > "HongQuan.Zhang" <hon...@i-...> > > > > To: > > "HongQuan.Zhang" <hon...@i-...> > > CC: > > <Dev...@li...> > > > > > > I do dynamic loading of libraries in my applications too using somethin= g > > like the following for Win32 applications. Normally I hide a bit more o= f > > the code in macros, to make it work with Linux too. > > > > #if BUILDING_DLL > > #define DLLIMPORT __declspec(dllexport) > > #else > > #define DLLIMPORT __declspec(dllimport) > > #endif > > > > extern "C" { > > DLLIMPORT DWORD __cdecl GetObjectFactoryCount(); > > DLLIMPORT bool __cdecl GetObjectFactory(DWORD n,ObjectFactoryInfo& info= ); > > } > > > > hLib =3D LoadLibrary(pszName); > > GetObjectFactoryCount =3D > > (suitable cast)GetProcAddress(hLib,"GetObjectFactoryCount"); > > GetObjectFactory =3D > > (suitable cast)GetProcAddress(hLib,"GetObjectFactory"); > > > > /Per W > > > > On Wed, 9 Aug 2006, HongQuan.Zhang wrote: > > > >> Per Westermarki"1/4s( > >> =09Thank you for answer my question. > >> =09I don't want to use __declspec(dllexport),because this director > > will output a function name with additional characters which are added = by > > compiler. > >> =09Example: > >> =09void=09Test(int a); > >> =09maybe output like this "_test@4" > >> =09I just want to output with name "Test" , So I can use LoadLibrary > > and GetProcAddress to get the function address easily! > >> =09That is,I need to load the dll and invoke the function dynamicly! > >> > >> =09In MSVC ,I can only need to do is provide a def file and write the > > function name down and compile! > >> =09Anyway,thanks again! > >> > >> > >> > >> Hongquan > >> > >> > >> > >> > >> -----=A8=A6,?a"??a*Z(Y"a"??----- > >> a*?=A1=AEa"??a"^(o)^(o): Per Westermark [mailto:pw...@ia...] > >> a*?=A1=AE=A8=A6EUR??=A1=AA?=A8=A6=A1=AA?: 2006a*^(1)?8?oe^9?=A1=AA? 17= :48 > >> ?=A1=B1?a"??a"^(o)^(o): HongQuan.Zhang > >> ?S("=A8=A6EUR?: Dev...@li... > >> a"??=A8=A6?~: Re: [Dev-C++] c,?=A1=B1a*=A1=E8?: How to build a DLL wit= h def filei"1/4Y" > >> > >> Note that in C++, the external name of functions are mangled. Extra di= gits > > and characters are added to the name to distinguish type information. T= his > > is needed since C++ allows multiple functions with the same name but wi= th > > different signatures. For example: > >> int Test() { return 0} > >> int Test(int a) { return a; } > >> int Test(int a,int b) { return a+b; } > >> int Test(const char* s) { return strlen(s); } ... > >> > >> If you use a file to specify exported symbols, you have to specify the > > fully mangled name. > >> Or, you have to declare the function as type "C", to avoid the name > > manging. The function will then just get an initial underscore in it's > > external name - _Test. > >> When developing on Windows systems, it is quite common to use the M$ > >> extension: > >> __declspec(dllexport) > >> before name of exported symbols directly in the source code. > >> > >> The linker will then be able to extract the information about all expo= rted > > symbols automatically, without the need of the def file. > >> You might have code: > >> > >> __declspec(dllexport) int my_variable; > >> __declspec(dllexport) int Test() { return 0; } ... > >> > >> Normally the dll declaration is hidden in a #define, to make the code > > compatible with compilers/environments that doesn't support DLL files. > >> #define __declspec(dllexport) EXPORT > >> > >> EXPORT int my_variable; > >> EXPORT int Test() { return 0; } > >> > >> > >> In the same way, code that needs to access a function or variable defi= ned > > in a DLL may use __declspec(dllimport) instead. > >> /Per W > >> > >> On Wed, 9 Aug 2006, HongQuan.Zhang wrote: > >> > >>> I am sorry that I haven't finish the post before I send it! > >>> the original message is at below. > >>> And I just want to know how to code the def file,or how to build a dl= l > >>> with specify export function name! > >>> Thanks a lot! > >>> > >>> Hongquan > >>> > >>> -----A~=A1=B0A~S(A^1/4A~3/4A~=A1=B1A^?A^1/4A~3/4----- > >>> A^=A1=A4A^?A^1/4A~3/4A~^A~<: HongQuan.Zhang [mailto:hongquan.zhang@i-= zq.com] > >>> A^=A1=A4A^?A~<A~?A~S(A^=A1=C0A^1/4A~=A1=E8: 2006A~"A~^(a)8A~=A1=B1A~,= 9A~^A~. 17:16 > >>> A~S(A~.A^1/4A~3/4A~^A~<: 'Dev...@li...' > >>> A~=A8CA~=A1=A4A~OEA~?: How to build a DLL with def fileA^?A^? > >>> > >>> HiA^?A^?All: > >>> =09I create a dll project and I want to export some function such as > >>> =09void Test(); > >>> =09I add a def file like def file in MSVC,and of course I add a linke= r > >>> opiton "-def test.def" > >>> =09 in project options->parameter->linker > >>> =09In the file Test.def,there are only several code as follow: > >>> > >>> ; test.def : Declares the module parameters for the DLL. > >>> > >>> LIBRARY "test" > >>> DESCRIPTION 'test Windows Dynamic Link Library' > >>> > >>> EXPORTS > >>> ; Explicit exports can go here > >>> Test > >>> > >>> > >>> When I compile the project and get some error: > >>> [Linker error] undefined reference to `Test' > >>> > >>> > >>> > >>> > >> > >> > >> > >> ----------------------------------------------------------------------= --- > >> Using Tomcat but need to do more? Need to support web services, securi= ty? > >> Get stuff done quickly with pre-integrated technology to make your job > > easier > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Gero= nimo > >> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&da= t=3D121642 > >> _______________________________________________ > >> Dev-cpp-users mailing list > >> Dev...@li... > >> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >> > > > > > > -----------------------------------------------------------------------= - > > > > -----------------------------------------------------------------------= -- > > Using Tomcat but need to do more? Need to support web services, securit= y? > > Get stuff done quickly with pre-integrated technology to make your job = easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geron= imo > > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > > > > > > -----------------------------------------------------------------------= - > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > |
From: Per W. <pw...@ia...> - 2006-08-18 13:38:58
|
Are you writing xx << std::endl or writing using std::endl; ... xx << endl; This is necessary since endl is in namespace std. Older compilers didn't required the std:: modifier since their standard libary was created before the current C++ standard. /Per W On Fri, 18 Aug 2006, Ekion Daimonion wrote: > I am having trouble getting the program to recognize endl. sometimes it does > and other times it says that endl is not declared. > |
From: Thomas O'H. <To...@Re...> - 2006-08-18 12:53:42
|
I have "yet" to be able to export my own functions when trying to use WinPCap SDK. I am not sure this will be enough, but maybe if someone can write an "Hello World" DLL using a UDF I can finally see the light? I just want to see it work from an external program: MyFunc(@cBuffer) If cBuffer return "Hello World" I will be a happy camper. I know there is something severely stupid I am overlooking. Now I just must determine if it is my working environment or I have an option set wrong. OK, laugh, but I just need to figure out what really stupid mistake I made. In WinPCap it "seemed" that exported functions had to be in a LIB file to work. That is the only way I could get them to work in their samples. I am not sure what I am asking for will relate to WinPCap or not, but if someone has a few minutes... >From what I see on both this list & the WinPCap list, exporting functions seems to be a major topic. So at least I can have some comfort.... I also appear to see a glimpse of maybe the key is that many use MS Visual Studio, MS .Net, and of course Dev-C++. IOW, so many environments it is easy to create the wrong environment. I guess the best way, "if" someone can do this for me, is to zip the project and sent it to me off list. That is unless anyone else really wants to see it too. Way Too Frustrated & Growing too old too fast, ~ Thomas O'Hare ~ President, RedTile, Inc. - DBA: RedTile Software Web, Wireless, Network, Database & Systems Software +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/ Operations Manager; Virtual FoxPro User Group To...@VF... ; http://www.VFUG.Org/ HongQuan.Zhang wrote: > Hi, Thomas: > In fact,you don't have to add a def file to the project made by > Dev-Cpp ,you can refer to the attachment ,which is a email Per Westermark > send out and this perfect mail help me to solve my problem! > Hope this can help you! > > HongQuan > > -----邮件原件----- > 发件人: dev...@li... > [mailto:dev...@li...] 代表 Thomas O'Hare > 发送时间: 2006年8月11日 21:38 > 收件人: dev...@li... > 抄送: Dev...@li... > 主题: Re: [Dev-C++] How to build a DLL with def file? > > Hong, et. al. > > I used the common way as described below. But I swear I get different > results as my project continues. > > I had added the DEF file to the Linker and all was OK. Then at some point I > had to remove the DEF from the Linker to compile. > > Either I overlooked something or something I am clueless about is going on. > > So, what is the "best" way to use a DEF file to export functions in > Dev-C++??? Not only a code sample but also where to list the file. > > I am sure it is just me but any help will be appreciated. I am burning up > way too much time on this. > > Thanks, > ~ Thomas O'Hare ~ > President, RedTile, Inc. - DBA: RedTile Software Web, Wireless, Network, > Database & Systems Software > +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/ > Operations Manager; Virtual FoxPro User Group To...@VF... ; > http://www.VFUG.Org/ > > > HongQuan.Zhang wrote: >> Hi,All: >> I create a dll project and I want to export some function such as >> void Test(); >> I add a def file like def file in MSVC,and of course I add a linker >> opiton "-def test.def" >> in project options->parameter->linker >> In the file Test.def,there are only several code as follow: >> >> ; test.def : Declares the module parameters for the DLL. >> >> LIBRARY "test" >> DESCRIPTION 'test Windows Dynamic Link Library' >> >> EXPORTS >> ; Explicit exports can go here >> Test >> >> >> When I compile the project and get some error: >> [Linker error] undefined reference to `Test' >> >> >> >> >> >> ---------------------------------------------------------------------- >> -- >> >> ---------------------------------------------------------------------- >> --- Using Tomcat but need to do more? Need to support web services, >> security? >> Get stuff done quickly with pre-integrated technology to make your job >> easier Download IBM WebSphere Application Server v.1.0.1 based on >> Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216 >> 42 >> >> >> ---------------------------------------------------------------------- >> -- >> >> _______________________________________________ >> Dev-cpp-users mailing list >> Dev...@li... >> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > ------------------------------------------------------------------------ > > Subject: > Re: [Dev-C++] ??: ??: How to build a DLL with def file? > From: > "Per Westermark" <pw...@ia...> > Date: > Wed, 9 Aug 2006 19:41:00 +0800 > To: > "HongQuan.Zhang" <hon...@i-...> > > To: > "HongQuan.Zhang" <hon...@i-...> > CC: > <Dev...@li...> > > > I do dynamic loading of libraries in my applications too using something > like the following for Win32 applications. Normally I hide a bit more of > the code in macros, to make it work with Linux too. > > #if BUILDING_DLL > #define DLLIMPORT __declspec(dllexport) > #else > #define DLLIMPORT __declspec(dllimport) > #endif > > extern "C" { > DLLIMPORT DWORD __cdecl GetObjectFactoryCount(); > DLLIMPORT bool __cdecl GetObjectFactory(DWORD n,ObjectFactoryInfo& info); > } > > hLib = LoadLibrary(pszName); > GetObjectFactoryCount = > (suitable cast)GetProcAddress(hLib,"GetObjectFactoryCount"); > GetObjectFactory = > (suitable cast)GetProcAddress(hLib,"GetObjectFactory"); > > /Per W > > On Wed, 9 Aug 2006, HongQuan.Zhang wrote: > >> Per Westermarki"1/4s( >> Thank you for answer my question. >> I don't want to use __declspec(dllexport),because this director > will output a function name with additional characters which are added by > compiler. >> Example: >> void Test(int a); >> maybe output like this "_test@4" >> I just want to output with name "Test" , So I can use LoadLibrary > and GetProcAddress to get the function address easily! >> That is,I need to load the dll and invoke the function dynamicly! >> >> In MSVC ,I can only need to do is provide a def file and write the > function name down and compile! >> Anyway,thanks again! >> >> >> >> Hongquan >> >> >> >> >> -----é,?a"??a*Z(Y"a"??----- >> a*?‘a"??a"^(o)^(o): Per Westermark [mailto:pw...@ia...] >> a*?‘éEUR??―?é―?: 2006a*^(1)?8?oe^9?―? 17:48 >> ?”?a"??a"^(o)^(o): HongQuan.Zhang >> ?S("éEUR?: Dev...@li... >> a"??é?~: Re: [Dev-C++] c,?”a*¤?: How to build a DLL with def filei"1/4Y" >> >> Note that in C++, the external name of functions are mangled. Extra digits > and characters are added to the name to distinguish type information. This > is needed since C++ allows multiple functions with the same name but with > different signatures. For example: >> int Test() { return 0} >> int Test(int a) { return a; } >> int Test(int a,int b) { return a+b; } >> int Test(const char* s) { return strlen(s); } ... >> >> If you use a file to specify exported symbols, you have to specify the > fully mangled name. >> Or, you have to declare the function as type "C", to avoid the name > manging. The function will then just get an initial underscore in it's > external name - _Test. >> When developing on Windows systems, it is quite common to use the M$ >> extension: >> __declspec(dllexport) >> before name of exported symbols directly in the source code. >> >> The linker will then be able to extract the information about all exported > symbols automatically, without the need of the def file. >> You might have code: >> >> __declspec(dllexport) int my_variable; >> __declspec(dllexport) int Test() { return 0; } ... >> >> Normally the dll declaration is hidden in a #define, to make the code > compatible with compilers/environments that doesn't support DLL files. >> #define __declspec(dllexport) EXPORT >> >> EXPORT int my_variable; >> EXPORT int Test() { return 0; } >> >> >> In the same way, code that needs to access a function or variable defined > in a DLL may use __declspec(dllimport) instead. >> /Per W >> >> On Wed, 9 Aug 2006, HongQuan.Zhang wrote: >> >>> I am sorry that I haven't finish the post before I send it! >>> the original message is at below. >>> And I just want to know how to code the def file,or how to build a dll >>> with specify export function name! >>> Thanks a lot! >>> >>> Hongquan >>> >>> -----A~“A~S(A^1/4A~3/4A~”A^?A^1/4A~3/4----- >>> A^・A^?A^1/4A~3/4A~^A~<: HongQuan.Zhang [mailto:hon...@i-...] >>> A^・A^?A~<A~?A~S(A^±A^1/4A~¤: 2006A~"A~^(a)8A~”A~,9A~^A~. 17:16 >>> A~S(A~.A^1/4A~3/4A~^A~<: 'Dev...@li...' >>> A~A~・A~OEA~?: How to build a DLL with def fileA^?A^? >>> >>> HiA^?A^?All: >>> I create a dll project and I want to export some function such as >>> void Test(); >>> I add a def file like def file in MSVC,and of course I add a linker >>> opiton "-def test.def" >>> in project options->parameter->linker >>> In the file Test.def,there are only several code as follow: >>> >>> ; test.def : Declares the module parameters for the DLL. >>> >>> LIBRARY "test" >>> DESCRIPTION 'test Windows Dynamic Link Library' >>> >>> EXPORTS >>> ; Explicit exports can go here >>> Test >>> >>> >>> When I compile the project and get some error: >>> [Linker error] undefined reference to `Test' >>> >>> >>> >>> >> >> >> >> ------------------------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job > easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> Dev-cpp-users mailing list >> Dev...@li... >> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >> > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Ekion D. <eki...@gm...> - 2006-08-18 12:37:22
|
I am having trouble getting the program to recognize endl. sometimes it does and other times it says that endl is not declared. |
From: Cherry J. <joh...@ya...> - 2006-08-17 18:10:35
|
joh...@ya... --------------------------------- Get your email and more, right on the new Yahoo.com |
From: HongQuan.Zhang <hon...@i-...> - 2006-08-14 02:51:25
|
Hi, Thomas: In fact,you don't have to add a def file to the project made by Dev-Cpp ,you can refer to the attachment ,which is a email Per = Westermark send out and this perfect mail help me to solve my problem! Hope this can help you! HongQuan -----=D3=CA=BC=FE=D4=AD=BC=FE----- =B7=A2=BC=FE=C8=CB: dev...@li... [mailto:dev...@li...] =B4=FA=B1=ED Thomas = O'Hare =B7=A2=CB=CD=CA=B1=BC=E4: 2006=C4=EA8=D4=C211=C8=D5 21:38 =CA=D5=BC=FE=C8=CB: dev...@li... =B3=AD=CB=CD: Dev...@li... =D6=F7=CC=E2: Re: [Dev-C++] How to build a DLL with def file=A3=BF Hong, et. al. I used the common way as described below. But I swear I get different results as my project continues. I had added the DEF file to the Linker and all was OK. Then at some = point I had to remove the DEF from the Linker to compile. Either I overlooked something or something I am clueless about is going = on. So, what is the "best" way to use a DEF file to export functions in Dev-C++??? Not only a code sample but also where to list the file. I am sure it is just me but any help will be appreciated. I am burning = up way too much time on this. Thanks, ~ Thomas O'Hare ~ President, RedTile, Inc. - DBA: RedTile Software Web, Wireless, Network, Database & Systems Software +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/ Operations Manager; Virtual FoxPro User Group To...@VF... ; http://www.VFUG.Org/ HongQuan.Zhang wrote: > Hi=A3=ACAll: > I create a dll project and I want to export some function such as=20 > void Test(); > I add a def file like def file in MSVC,and of course I add a linker=20 > opiton "-def test.def" > in project options->parameter->linker=20 > In the file Test.def,there are only several code as follow: >=20 > ; test.def : Declares the module parameters for the DLL. >=20 > LIBRARY "test" > DESCRIPTION 'test Windows Dynamic Link Library' >=20 > EXPORTS > ; Explicit exports can go here > Test >=20 >=20 > When I compile the project and get some error: > [Linker error] undefined reference to `Test'=20 >=20 >=20 >=20 >=20 >=20 > ---------------------------------------------------------------------- > -- >=20 > ---------------------------------------------------------------------- > --- Using Tomcat but need to do more? Need to support web services,=20 > security? > Get stuff done quickly with pre-integrated technology to make your job = > easier Download IBM WebSphere Application Server v.1.0.1 based on=20 > Apache Geronimo > = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 1216 > 42 >=20 >=20 > ---------------------------------------------------------------------- > -- >=20 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Thomas O'H. <To...@Re...> - 2006-08-11 13:38:30
|
Hong, et. al. I used the common way as described below. But I swear I get different results as my project continues. I had added the DEF file to the Linker and all was OK. Then at some point I had to remove the DEF from the Linker to compile. Either I overlooked something or something I am clueless about is going on. So, what is the "best" way to use a DEF file to export functions in Dev-C++??? Not only a code sample but also where to list the file. I am sure it is just me but any help will be appreciated. I am burning up way too much time on this. Thanks, ~ Thomas O'Hare ~ President, RedTile, Inc. - DBA: RedTile Software Web, Wireless, Network, Database & Systems Software +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/ Operations Manager; Virtual FoxPro User Group To...@VF... ; http://www.VFUG.Org/ HongQuan.Zhang wrote: > Hi,All: > I create a dll project and I want to export some function such as > void Test(); > I add a def file like def file in MSVC,and of course I add a linker > opiton "-def test.def" > in project options->parameter->linker > In the file Test.def,there are only several code as follow: > > ; test.def : Declares the module parameters for the DLL. > > LIBRARY "test" > DESCRIPTION 'test Windows Dynamic Link Library' > > EXPORTS > ; Explicit exports can go here > Test > > > When I compile the project and get some error: > [Linker error] undefined reference to `Test' > > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Per W. <pw...@ia...> - 2006-08-09 11:41:13
|
I do dynamic loading of libraries in my applications too using something like the following for Win32 applications. Normally I hide a bit more of the code in macros, to make it work with Linux too. #if BUILDING_DLL #define DLLIMPORT __declspec(dllexport) #else #define DLLIMPORT __declspec(dllimport) #endif extern "C" { DLLIMPORT DWORD __cdecl GetObjectFactoryCount(); DLLIMPORT bool __cdecl GetObjectFactory(DWORD n,ObjectFactoryInfo& info); } hLib =3D LoadLibrary(pszName); GetObjectFactoryCount =3D (suitable cast)GetProcAddress(hLib,"GetObjectFactoryCount"); GetObjectFactory =3D (suitable cast)GetProcAddress(hLib,"GetObjectFactory"); /Per W On Wed, 9 Aug 2006, HongQuan.Zhang wrote: > Per Westermark=EF=BC=9A > =09Thank you for answer my question. > =09I don't want to use __declspec(dllexport),because this director will = output a function name with additional characters which are added by compil= er. > =09Example: > =09void=09Test(int a); > =09maybe output like this "_test@4" > =09I just want to output with name "Test" , So I can use LoadLibrary and = GetProcAddress to get the function address easily! > =09That is,I need to load the dll and invoke the function dynamicly! > > =09In MSVC ,I can only need to do is provide a def file and write the fun= ction name down and compile! > > =09Anyway,thanks again! > > > > Hongquan > > > > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: Per Westermark [mailto:pw...@ia...] > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2006=E5=B9=B48=E6=9C=889=E6=97=A5 1= 7:48 > =E6=94=B6=E4=BB=B6=E4=BA=BA: HongQuan.Zhang > =E6=8A=84=E9=80=81: Dev...@li... > =E4=B8=BB=E9=A2=98: Re: [Dev-C++] =E7=AD=94=E5=A4=8D: How to build a DLL = with def file=EF=BC=9F > > Note that in C++, the external name of functions are mangled. Extra digit= s and characters are added to the name to distinguish type information. Thi= s is needed since C++ allows multiple functions with the same name but with= different signatures. For example: > > int Test() { return 0} > int Test(int a) { return a; } > int Test(int a,int b) { return a+b; } > int Test(const char* s) { return strlen(s); } ... > > If you use a file to specify exported symbols, you have to specify the fu= lly mangled name. > > Or, you have to declare the function as type "C", to avoid the name mangi= ng. The function will then just get an initial underscore in it's external = name - _Test. > > When developing on Windows systems, it is quite common to use the M$ > extension: > __declspec(dllexport) > before name of exported symbols directly in the source code. > > The linker will then be able to extract the information about all exporte= d symbols automatically, without the need of the def file. > > You might have code: > > __declspec(dllexport) int my_variable; > __declspec(dllexport) int Test() { return 0; } ... > > Normally the dll declaration is hidden in a #define, to make the code com= patible with compilers/environments that doesn't support DLL files. > > #define __declspec(dllexport) EXPORT > > EXPORT int my_variable; > EXPORT int Test() { return 0; } > > > In the same way, code that needs to access a function or variable defined= in a DLL may use __declspec(dllimport) instead. > > /Per W > > On Wed, 9 Aug 2006, HongQuan.Zhang wrote: > > > I am sorry that I haven't finish the post before I send it! > > the original message is at below. > > And I just want to know how to code the def file,or how to build a dll > > with specify export function name! > > Thanks a lot! > > > > Hongquan > > > > -----=C3=93=C3=8A=C2=BC=C3=BE=C3=94=C2=AD=C2=BC=C3=BE----- > > =C2=B7=C2=A2=C2=BC=C3=BE=C3=88=C3=8B: HongQuan.Zhang [mailto:hongquan.z= ha...@i-...] > > =C2=B7=C2=A2=C3=8B=C3=8D=C3=8A=C2=B1=C2=BC=C3=A4: 2006=C3=84=C3=AA8=C3= =94=C3=829=C3=88=C3=95 17:16 > > =C3=8A=C3=95=C2=BC=C3=BE=C3=88=C3=8B: 'Dev...@li...urceforge.= net' > > =C3=96=C3=B7=C3=8C=C3=A2: How to build a DLL with def file=C2=A3=C2=BF > > > > Hi=C2=A3=C2=ACAll: > > =09I create a dll project and I want to export some function such as > > =09void Test(); > > =09I add a def file like def file in MSVC,and of course I add a linker > > opiton "-def test.def" > > =09 in project options->parameter->linker > > =09In the file Test.def,there are only several code as follow: > > > > ; test.def : Declares the module parameters for the DLL. > > > > LIBRARY "test" > > DESCRIPTION 'test Windows Dynamic Link Library' > > > > EXPORTS > > ; Explicit exports can go here > > Test > > > > > > When I compile the project and get some error: > > [Linker error] undefined reference to `Test' > > > > > > > > > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job ea= sier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |