Обсуждение: Using VC++ Express to develop pgAdmin3
Hello, My apologies right up front if this is the wrong place to look for help. I have been trying to compile and run the latest pgAdmin3 source code and after battling my way through compile and link errors I have final been stopped cold. When I try to run pgAdmin3 from inside VC Express I get the following error... "Unhandled exception at 0xecdb1e91 in pgAdmin3.exe: 0xC0000005: Access violation reading location 0xecdb1e91." This is occurring in the call stack at... pgAdmin3.exe!wxULongLongNative::operator+=() + 0x52c3e bytes pgAdmin3.exe!__security_init_cookie() Line 174 pgAdmin3.exe!WinMainCRTStartup() Line 402 Does this look familiar to anyone? Do I have something obviously wrong with my VC Express setup? Is this related to the http://www.pgadmin.org/archives/pgadmin-hackers/2006-04/msg00064.php issue? Is it that VC Express can't be used to develop pgAdmin3 and I'm hosed? or I am just a complete prat? Thanks, Jeff _________________________________________________________________ Win a Zune��make MSN� your homepage for your chance to win! http://homepage.msn.com/zune?icid=hmetagline
Jeff Boehmer wrote: > Hello, > > My apologies right up front if this is the wrong place to look for help. > > I have been trying to compile and run the latest pgAdmin3 source code > and after battling my way through compile and link errors I have final > been stopped cold. Battling? as long as you have the dependency tree setup correctly (and with VC++ Express, the platform SDK installed), everything should build easily on Windows. What did you have to do to get things working? > When I try to run pgAdmin3 from inside VC Express I get the following > error... > > "Unhandled exception at 0xecdb1e91 in pgAdmin3.exe: 0xC0000005: Access > violation reading location 0xecdb1e91." > > This is occurring in the call stack at... > > pgAdmin3.exe!wxULongLongNative::operator+=() + 0x52c3e bytes > pgAdmin3.exe!__security_init_cookie() Line 174 > pgAdmin3.exe!WinMainCRTStartup() Line 402 > > > Does this look familiar to anyone? Nope. > Do I have something obviously wrong with my VC Express setup? It's possible, but the only changes required from a standard install are the addition of the platform SDK paths to the config, per http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/ > Is this related to the > http://www.pgadmin.org/archives/pgadmin-hackers/2006-04/msg00064.php issue? No, Andreas was mistaken in that case. > Is it that VC Express can't be used to develop pgAdmin3 and I'm hosed? > or I am just a complete prat? Well I don't know you well enough to comment on the latter :-), but I use both Visual Studio and VC++ Express to develop pgAdmin without any problems. Regards, Dave.
Jeff Boehmer wrote: > David, > > Thanks for your reply. It's been a long time since I did any c/c++ > development. For the last 10 years it's been a lot of Java, VB, web, > and database work. I have some free time right now because I am between > jobs so I thought I would look into open source. > > Since I haven't used VC development tools in a long while I have had to > start from scratch. Just getting the VC Express, the PDK, Postgres, and > wxWidgets setup and/or compiled has taken me a number of days. > Obviously I still have something messed up in my setup somewhere. > > Since this error pops up before any break points that I set, do you > think it's a missing dll reference or something. Any suggestions would > be helpful. [Please keep replies on list] No, I don't think so - it's pretty good about warning for things like that. Can you run the wxWidgets sample apps OK? Regards, Dave
David, Thanks for the advice. I am able to run the wxWidgets samples and create my own wxWidget 'hello world' test. While going through the setup for the 'hello world' I realized that some of the additional dependencies I had set up for pgAdmin3 were incorrect. (That's what I get for cutting and pasting from help sites without cross checking my libraries.) I still get the access violation but I can now debug the location (wxStringBase.GetStringData()). I will sweep through my setup again and double check everything. Thanks again for the help, Jeff >From: Dave Page <dpage@postgresql.org> >To: Jeff Boehmer <jeff_boehmer@hotmail.com>, pgadmin-hackers@postgresql.org >Subject: Re: [pgadmin-hackers] Using VC++ Express to develop pgAdmin3 >Date: Tue, 06 Mar 2007 17:02:48 +0000 > >Jeff Boehmer wrote: >>David, >> >>Thanks for your reply. It's been a long time since I did any c/c++ >>development. For the last 10 years it's been a lot of Java, VB, web, and >>database work. I have some free time right now because I am between jobs >>so I thought I would look into open source. >> >>Since I haven't used VC development tools in a long while I have had to >>start from scratch. Just getting the VC Express, the PDK, Postgres, and >>wxWidgets setup and/or compiled has taken me a number of days. Obviously >>I still have something messed up in my setup somewhere. >> >>Since this error pops up before any break points that I set, do you think >>it's a missing dll reference or something. Any suggestions would be >>helpful. > >[Please keep replies on list] > >No, I don't think so - it's pretty good about warning for things like that. >Can you run the wxWidgets sample apps OK? > >Regards, Dave > >---------------------------(end of broadcast)--------------------------- >TIP 4: Have you searched our list archives? > > http://archives.postgresql.org _________________________________________________________________ Don�t miss your chance to WIN 10 hours of private jet travel from Microsoft� Office Live http://clk.atdmt.com/MRT/go/mcrssaub0540002499mrt/direct/01/
Jeff Boehmer wrote: > > David, > > Thanks for the advice. > > I am able to run the wxWidgets samples and create my own wxWidget 'hello > world' test. > > While going through the setup for the 'hello world' I realized that some > of the additional dependencies I had set up for pgAdmin3 were > incorrect. (That's what I get for cutting and pasting from help sites > without cross checking my libraries.) > > I still get the access violation but I can now debug the location > (wxStringBase.GetStringData()). I will sweep through my setup again and > double check everything. Did you read all of our setup documentation? There's some help at http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/trunk/pgadmin3/xtra/wx-build/readme.txt?rev=5679&view=markup, as well as on the website at http://www.pgadmin.org/download/source.php Regards, Dave.
Dave, Thanks. I went back and started over completely. I set my environment up exactly as it is in the vcproj file, followed all the instructions to the letter and it compiled and ran. I think the problem I was seeing was because I had failed to compile some libs as unicode. Note: The build widgets bat file did not work since vcbuild at the command prompt could not see the PDK includes and libs. Since VC Express could see them, I just opened each project and compiled them for Debug and Release. I had the same problem compiling the libpq.lib file but I used a hack where I copied the includes and libs from the PDK into VC Express' include and lib directories. I didn't like doing that so I did it on another computer. Thanks again for your help, Jeff >From: Dave Page <dpage@postgresql.org> >To: Jeff Boehmer <jeff_boehmer@hotmail.com> >CC: pgadmin-hackers@postgresql.org >Subject: Re: [pgadmin-hackers] Using VC++ Express to develop pgAdmin3 >Date: Tue, 06 Mar 2007 19:15:38 +0000 > >Jeff Boehmer wrote: >> >>David, >> >>Thanks for the advice. >> >>I am able to run the wxWidgets samples and create my own wxWidget 'hello >>world' test. >> >>While going through the setup for the 'hello world' I realized that some >>of the additional dependencies I had set up for pgAdmin3 were incorrect. >>(That's what I get for cutting and pasting from help sites without cross >>checking my libraries.) >> >>I still get the access violation but I can now debug the location >>(wxStringBase.GetStringData()). I will sweep through my setup again and >>double check everything. > >Did you read all of our setup documentation? There's some help at >http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/trunk/pgadmin3/xtra/wx-build/readme.txt?rev=5679&view=markup, >as well as on the website at http://www.pgadmin.org/download/source.php > >Regards, Dave. > >---------------------------(end of broadcast)--------------------------- >TIP 2: Don't 'kill -9' the postmaster _________________________________________________________________ Win a Zune��make MSN� your homepage for your chance to win! http://homepage.msn.com/zune?icid=hmetagline
Jeff Boehmer wrote: > > Dave, > > Thanks. I went back and started over completely. I set my environment > up exactly as it is in the vcproj file, followed all the instructions to > the letter and it compiled and ran. I think the problem I was seeing > was because I had failed to compile some libs as unicode. OK. > Note: The build widgets bat file did not work since vcbuild at the > command prompt could not see the PDK includes and libs. Since VC > Express could see them, I just opened each project and compiled them for > Debug and Release. Hadn't thought of that. There is a project file in the wxWidgets source that includes virtually all of the sub projects though - you still have to de-select the builds you don't want, but it saves some effort. > I had the same problem compiling the libpq.lib file but I used a hack > where I copied the includes and libs from the PDK into VC Express' > include and lib directories. I didn't like doing that so I did it on > another computer. If you install the windows build of PostgreSQL, and include the developer components you should get all the libs and headers pgAdmin needs from PostgreSQL, in a location where it'll find them without reconfiguration. > Thanks again for your help, Pretty sure it was you that did all the hard work, but thanks :-) Regards Dave