Solved

Run external Program

Posted on 1998-04-14
2
1,452 Views
Last Modified: 2013-11-20
Dear
         
       WinExec("cl.exe",SW_SHOWNORMAL);
        I run cl (SDK) program in a MFC program
       When I complie the MFC program, it runs cl        automatically, before linking.
       And it doesn't allow linkng.
     
      What is the program  
0
Comment
Question by:logout
[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
2 Comments
 
LVL 3

Expert Comment

by:byang
ID: 1317737
Let's see if I understand you correctly.

If cl is the compiler, I assume when you compile the MFC program, either you or the IDE will run it, right ? Nothing wrong with that.

Can't link ? What's the error message ?

None of the above has anything to do with how you run cl from within your MFC program, whether you use WinExec() or not.

0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 20 total points
ID: 1317738
>Dear

Dear dear        

>WinExec("cl.exe",SW_SHOWNORMAL);

This looks fine (but for Win95/NT you should really use CreateProcess)

>I run cl (SDK) program in a MFC program

The line above would run the cl.exe program assuming that it is on the program path or current directoy.

Your reference to (SDK) doesn't seem to amke sense, cl is not an SDK program, it is a tool (compiler) that is part of VC.

>When I complie the MFC program, it runs cl automatically, before linking.

Now you're not making sense.  Compiling the MFC program won't run it.  Your WinExec will not happen until you have compiled and linked the program and then run it.

Of course compiling the program will result in cl.exe running because it is the compiler program.  But that is not related to you having the WinExec call in your program source.

>And it doesn't allow linkng.
     
The linker won't run unless you build the entire project, compiling a single source file won't make it link.

>What is the program

Do you want to know the name of the linker program?  It is link.exe

Are you trying to make your own IDE-like environment to compile and link programs?

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
xyBalance chalenge 58 104
fix34  challenge 9 181
My project did see openJDK that I installed. What could be the problem 7 171
Work with App store 7 122
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 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