• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Link C++ - SKILL

Stats

  • Replies 16
  • Subscribers 159
  • Views 11200
  • Members are here 0
More Content

Link C++ - SKILL

Yann00
Yann00 over 12 years ago

hi,

 

Could someone explain to me how to make a link between C++ and SKILL?

I have to develop a program in SKILL. But I do some text treatment in C++. So how I can load my SKILL program, and then lunch my C++ program? I have, in the SKILL program, to have a position with text file from C++.

Ask me if you want more details.

Best regards

  • Sign in to reply
  • Cancel
  • Yann00
    Yann00 over 12 years ago

    Yes I do.

    What did you write in system("??")?

    Does it create a file text "Centre_Cartouche.txt"? Because I give you the file Centre_Cartouche.txt just for you to have a look wath it seems like.

    (brd.txt,   sym.txt ) is the two files read by the C++ at the beginning. Centre_Cartouche.txt will be create after treatment on this two files. So  Centre_Cartouche.txt is my output. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ztzg
    ztzg over 12 years ago
    Hi Yann00,

    As fxffxf wrote, system("program arg1 arg2...") should to work.

    One thing which *might* be going wrong is that if you are working under
    Windows, reverse solidus (\) characters have to be doubled in literal
    strings, as they clash with the SKILL escape mechanism:

    system("e:\\work\\program.exe arg1 arg2...")

    Another thing to watch out for is spaces in the path to the binary; I'm
    not even sure about the proper quoting mechanism under Windows… this
    *might* work, but I'd double check the docs for cmd.exe:

    system("\"c:\\Program Files\\My\\Program.exe\" arg1 arg2...")

    (And similarly for the arguments.)

    Another solution, which offers more control—but suffers from the same
    quoting madness—would be to use the ipc* family of functions
    (ipcBeginProcess, etc.). I have put together a small example at:

    s.crosstwine.com/spb/d2692740

    and you will find a complete package attached to this message (tested
    under Linux).

    Hope this helps,
    Damien
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ztzg
    ztzg over 12 years ago

    So it seems attachments to email replies get eaten by the system.

    Trying again, using the web interface; I have also uploaded an unpacked version to:

     http://crosstwine.com/misc/letters/2013/01/16/SKILL-C++-Interaction/c-delegate/ 

    c-delegate-ad93a5f3.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Yann00
    Yann00 over 12 years ago

    I tried your example and it seems to be ok.

    But there is something wrong when I try to do the same for me...  (every time (: )

    So I won to create my DLL program. I put files there and it works, it creates my Centre_Cartouche.txt when I Test my DLL.

    I tried to import it in my skill program. And strange, ... It doesn't work!

    I read the allegro pdf on that but I have some problems to identify my problem.

    Did someone already load a dll on his skill program?

     

    Attachment.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fxffxf
    fxffxf over 12 years ago

    Like in C, Skill treats the backslash character (\) as special. If spawning a program via the Skill "system" call. You should try using UNIX style path seperates (/) instead of Windows style. If using backslashes depending upon what you do in creating the string you may need to escape the baclslash (e..g use 2 backslashes to get 1). 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<>
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information