Solved

Link C static lib with VB?

Posted on 2001-08-01
7
365 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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 100 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

717 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