Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. library question

library question

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpc++visual-studiotutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mcsherry
    wrote on last edited by
    #1

    (apologies if this is a really noddy question but its been a long day and my brain is fried :sigh: ) anyway I have created a library from a group of ADA files which used to form a program, I've have also written a C header file which has a list of accessible functions contained in the ada library (done as extern myFuncName ). I have now tried to use this library in a simple console application which consists of a main.cpp file and has the C header file #included. I have then changed the project settings so that it lists the ada library. Then in my main function i have called myFuncName ( ) ; but when it comes to linking the program it comes up as an unresolved external symbol. Does anyone have any ideas what I'm doing wrong? and also how to remedy it! I am using MS Visual Studio 6.0. TIA (off home now :-D )

    J C 2 Replies Last reply
    0
    • M mcsherry

      (apologies if this is a really noddy question but its been a long day and my brain is fried :sigh: ) anyway I have created a library from a group of ADA files which used to form a program, I've have also written a C header file which has a list of accessible functions contained in the ada library (done as extern myFuncName ). I have now tried to use this library in a simple console application which consists of a main.cpp file and has the C header file #included. I have then changed the project settings so that it lists the ada library. Then in my main function i have called myFuncName ( ) ; but when it comes to linking the program it comes up as an unresolved external symbol. Does anyone have any ideas what I'm doing wrong? and also how to remedy it! I am using MS Visual Studio 6.0. TIA (off home now :-D )

      J Offline
      J Offline
      Jaime Stuardo
      wrote on last edited by
      #2

      Have you used __declspec(dllimport) myfuncName in your H file? Jaime

      1 Reply Last reply
      0
      • M mcsherry

        (apologies if this is a really noddy question but its been a long day and my brain is fried :sigh: ) anyway I have created a library from a group of ADA files which used to form a program, I've have also written a C header file which has a list of accessible functions contained in the ada library (done as extern myFuncName ). I have now tried to use this library in a simple console application which consists of a main.cpp file and has the C header file #included. I have then changed the project settings so that it lists the ada library. Then in my main function i have called myFuncName ( ) ; but when it comes to linking the program it comes up as an unresolved external symbol. Does anyone have any ideas what I'm doing wrong? and also how to remedy it! I am using MS Visual Studio 6.0. TIA (off home now :-D )

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #3

        you can try doing this:

        extern "C"
        {
        #include "whatever.h"
        }

        -c Software | Cleek

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups