Results 1 to 4 of 4

Thread: Unresolved externals

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Unresolved externals

    Quote Originally Posted by MarkoSan View Post
    Where should I put it, can I put it in main.cpp so I can initialize database at app beginning?
    An initialization of a static member is needed outside the class, in the global scope. I would strongly advise to put the definition (initialization) into cdatabaseconnection.cpp. That's where it belongs, doesn't it? You can access the pointer and initialize the actual connection anywhere you want by just including the header.
    Last edited by jpn; 17th March 2007 at 15:20. Reason: rephrased
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    MarkoSan (17th March 2007)

Similar Threads

  1. Replies: 16
    Last Post: 23rd May 2008, 11:12
  2. link error for visual studio.net 2003
    By berlin in forum Newbie
    Replies: 9
    Last Post: 29th September 2006, 17:06
  3. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 23:04
  4. What am I missing? Unresolved externals
    By derick in forum Qt Programming
    Replies: 49
    Last Post: 21st July 2006, 13:41
  5. Problems using DLL
    By larsli in forum Qt Programming
    Replies: 11
    Last Post: 15th July 2006, 11:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.