?
Solved

Link C static lib with VB?

Posted on 2001-08-01
7
Medium Priority
?
366 Views
Last Modified: 2012-08-13
I have a static .lib or .obj file that was written in Visual C that I need to link into a VB application... can anyone tell me if this is possible and if so, how it is done?  Building the lib as a DLL is not an option... it must be statically linked into the VB app...

Jeff
0
Comment
Question by:jeffs1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 1

Expert Comment

by:sgovinda
ID: 6341395
It is not possible!
0
 

Author Comment

by:jeffs1
ID: 6341519
Why? I am not a VB programmer... but does VB not produce a compiled, machine code object file?  Does it not link these with the standard link.exe?  Then why can it not link in a Visual C compiled obj file?

Jeff
0
 
LVL 6

Expert Comment

by:pierrecampe
ID: 6341909
I can not tell you how to do it
but i think it is possible
here's what i found while playing with vb
when vb compiles a program the C2 compiler runs as a proces
thats probably the same C2 vc uses
vb compiles all its modules to .obj files and deletes them when finished
there is 1 .obj file that comes with vb 'vbaexe6.obj'
so i think its save to assume that file is needed by the linker
when i ran the following 'program' while vb was compiling it prevented vb from deleting the .obj files
Private Sub Command1_Click()
    On Error Resume Next
    Do
       Open "ProjectLink.obj" For Input As #1
       DoEvents
    Loop While Err
    Close
End Sub
Private Sub Command2_Click()
    End
End Sub
however when i tried to link the .obj files and vbaexe6.obj the linker came with an error 'no entry point'
and there i was stuck
maybe you can solve that
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 38

Expert Comment

by:PaulHews
ID: 6342390
Yeah, I saw this in a VBPJ article once.  I think they replaced the linker with a custom linker.  It required some very fancy footwork if I remember correctly.  (Don't remember the article, but maybe it will remind someone else--someone with a mind.)
0
 
LVL 28

Accepted Solution

by:
AzraSound earned 300 total points
ID: 6342558
0
 
LVL 1

Expert Comment

by:Un1
ID: 6434998
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6435013
jeffs1,
Any updates?  You also have several other open questions that need tending to...
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question