#c++23 makefile for windows specific

38 messages · Page 1 of 1 (latest)

frank mason
#

There's this library that uses the latest c++23 features for windows specific system stuff. I used it to make a pong game. It runs for VS. But Idk how to make it run anywhere else. I want to make it run using a makefile. Im pretty sure it uses clang to compile. I've tried chat gpt and that failed me. Just give me a call if you're happy to discuss more details any time.
Private library can't be accessessed online, and the name is irrelevant to the scenario.

hazy anvilBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

frank mason
#

!howtoask

#

!howto ask

hazy anvilBOT
frank mason
#

...

hazy anvilBOT
#
How to Ask a Programming Question

Anyone can ask a question in our programming channels. Following the guide Writing The Perfect Question is recommended.

What to Post

State your problem clearly and provide all necessary details:

  • the relevant portion of your code, or all of it
  • the expected output
  • the actual output (or the full error)
    :trophy: Gold Standard: Minimal Reproducible Example
Where to Post

Provide the relevant code in the message, and format it nicely with a code block*. If it's too much for one message, you can upload it:

  • Compiler Explorer for most C and C++ snippets
  • OnlineGDB for interaction, debugging
    :no_entry: Do not post screenshots, let alone photos of your screen!
royal trout
#

It's a '/' instead of '!'. If thats the right one 😅

hazy anvilBOT
#

@frank mason

How to Ask a Programming Question

Anyone can ask a question in our programming channels. Following the guide Writing The Perfect Question is recommended.

What to Post

State your problem clearly and provide all necessary details:

  • the relevant portion of your code, or all of it
  • the expected output
  • the actual output (or the full error)
    :trophy: Gold Standard: Minimal Reproducible Example
Where to Post

Provide the relevant code in the message, and format it nicely with a code block*. If it's too much for one message, you can upload it:

  • Compiler Explorer for most C and C++ snippets
  • OnlineGDB for interaction, debugging
    :no_entry: Do not post screenshots, let alone photos of your screen!
#

@frank mason

Asking Your Question in the Right Channel

Welcome to Together C & C++. We have many channels on various topics, and encourage you to explore the channel list. Please ask your question in the appropriate channel:

Getting Programming Help
  • #1013107104678162544, #cpp-help-text for help with C++
  • #1013104018739974194, #c-help-text for help with C
  • #tooling if you can't get your code to run
  • the #360691955031867392 section for help with specific topics like algorithms
Showing off and Discussing Existing Code (any language)
  • #general-technical to discuss your projects
  • #c-cpp-discussion to discuss C and C++
  • #1078717238678409369 to get feedback
  • #1014328785685979136 to just show off
royal trout
#

You can also try in #bot-spam

frank mason
#

wdym? treat me like the ignorant that i am

royal trout
#

Maybe you could use an build system like cmake for your orginal question. But im only using it for some stuff. So i donno if thats the best choice in your case.

silk tulip
#

Can you link to the library?

frank mason
#

the library is private, and the owner asked me to not share it.

#

I can't use cmake because the rubric (stupid) states it can only be makefile

silk tulip
#

Rubric?

frank mason
#

It's for an assignment I have, the project is done but the rubric says it has to run on a makefile

silk tulip
#

Alright

#

So what's the question? How to write makefiles?

frank mason
#

The question is:
how do I use makefile to compile something that uses features from c++23?

#

in other words, I just need to compile it. if I figure that out the makefile is easy

royal trout
#

Use cmake and use the generated makefile kekw

frank mason
#

Also, it has to be in windows

silk tulip
#

Enabling C++23 is trivial, you just use the -std=c++23 compiler flag

#

The harder part is writing the rest of the makefile

frank mason
#

I did that and tried runing it with that flag and it came with error. about direct2D

silk tulip
#

Why didn't you mention it in your original post?

#

Show the error and your makefile

frank mason
#

true my fault. give me a min.

#

I attached makefile as .txt so u can see it in discord

#

I've got it compiling in a visual studio solution, i just don't know how

silk tulip
#

So it's not about the makefile, it's about the different compiler not liking your code

#

You'll need to debug this, it's on you

#

note: because 'StringView16{static_cast<decltype(args) &&>(args)...}' would be invalid: no matching constructor for
initialization of 'StringView16' (aka 'BasicStringView<const char16_t>')
Start by looking at what constructors StringView16 has