Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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 (Darkly)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Uncategorized
  3. Hei osaako kukaan teistä ohjelmoida?

Hei osaako kukaan teistä ohjelmoida?

Scheduled Pinned Locked Moved Uncategorized
atk
5 Posts 3 Posters 0 Views
  • 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.
  • IlpoF This user is from outside of this forum
    IlpoF This user is from outside of this forum
    Ilpo
    wrote last edited by
    #1

    Hei osaako kukaan teistä ohjelmoida? 😄

    Kuinka rikollista on includettaa cpp-käännösunitissa headereita näin?

    #atk

    IlpoF 1 Reply Last reply
    0
    • IlpoF Ilpo

      Hei osaako kukaan teistä ohjelmoida? 😄

      Kuinka rikollista on includettaa cpp-käännösunitissa headereita näin?

      #atk

      IlpoF This user is from outside of this forum
      IlpoF This user is from outside of this forum
      Ilpo
      wrote last edited by
      #2

      Tässä pitää tietää, että oon tekemässä tosiaan sitä qt-wrapperiä (eli tämä täytyy ajaa clangin läpi c++:na) joka linkataan lispiin (ts. ei haluta namemängläystä), mutta c2ffi-työkalu (joka generoi jotain taustatauhkaa joka helpottaa kirjaston lataamista lispistä) hämmentyy nähdessään extern "C" { }:n headerissa.

      #atk

      pulusoundA 1 Reply Last reply
      0
      • IlpoF Ilpo

        Tässä pitää tietää, että oon tekemässä tosiaan sitä qt-wrapperiä (eli tämä täytyy ajaa clangin läpi c++:na) joka linkataan lispiin (ts. ei haluta namemängläystä), mutta c2ffi-työkalu (joka generoi jotain taustatauhkaa joka helpottaa kirjaston lataamista lispistä) hämmentyy nähdessään extern "C" { }:n headerissa.

        #atk

        pulusoundA This user is from outside of this forum
        pulusoundA This user is from outside of this forum
        pulusound
        wrote last edited by
        #3

        @feuer toi lienee ihan ok, mutta jos ymmärrän tilanteen oikein niin tyypillinen ratkaisu tähän on kai sanoa headerissa

        #ifdef __cplusplus
        extern "C" {
        #endif

        (sisältö)

        #ifdef __cplusplus
        }
        #endif

        IlpoF 1 Reply Last reply
        0
        • pulusoundA pulusound

          @feuer toi lienee ihan ok, mutta jos ymmärrän tilanteen oikein niin tyypillinen ratkaisu tähän on kai sanoa headerissa

          #ifdef __cplusplus
          extern "C" {
          #endif

          (sisältö)

          #ifdef __cplusplus
          }
          #endif

          IlpoF This user is from outside of this forum
          IlpoF This user is from outside of this forum
          Ilpo
          wrote last edited by
          #4

          @ahihi Ymmärsit oikein, sehän teki tästä välittömästi vähemmän rikollisen näköistä.

          Kiitoksia.

          TurreT 1 Reply Last reply
          0
          • IlpoF Ilpo

            @ahihi Ymmärsit oikein, sehän teki tästä välittömästi vähemmän rikollisen näköistä.

            Kiitoksia.

            TurreT This user is from outside of this forum
            TurreT This user is from outside of this forum
            Turre
            wrote last edited by
            #5

            @feuer @ahihi
            Joo, jos on oma headeri niin sitten sinne noi extern-C:t.

            Mutta toisinaan tämä on paitsi tarpeellista myös välttämätöntä. Esim. Lua:n headereista nuo extern-C:t puuttuu joten C++:sta käyttäessä ainoa vaihtoehto on laittaa ne omaan koodiin includen ympärille 🤪 Siinäkin tapauksessa on hello worldia isommassa softassa järkevämpää tehdä tarkoitusta varten oma headeri jota voi ilman lisäkikkailuja käyttää.

            1 Reply Last reply
            1
            0
            • R ActivityRelay shared this topic
            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.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups